Convert PNM to WEBP
Turn PNM images into WEBP. Same size, lossy at quality 90 unless lossless is set.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop PNM files on the dialor turn it to pick what to do
PNM images as WEBP files.The picture keeps its width and height. The result is one WEBP file.
What you get
A WEBP file with the same width and height as the PNM, PBM, PGM or PPM you start with. By default the conversion is lossy at Quality 90.
WEBP is a web image format with lossy and lossless modes, alpha and animation. The conversion produces one file from each input.
Lossy or lossless
Lossy compression does not keep every pixel exactly. Quality sets how much detail it keeps. A higher value keeps more detail and makes a bigger file, and above 90 the file grows quickly while the picture barely changes.
Turn on Lossless to get a result identical to the input in pixels or samples. A lossless file is much bigger than a lossy one.
Size, color and turning
Set Max width or Max height to shrink a picture that is larger than the value. The shape stays the same, and a picture that is already smaller is not enlarged.
Turn on Grayscale to turn colors into shades of gray, which often makes the file smaller. Set Rotate to turn the result clockwise by 90, 180 or 270 degrees.
When it fails
If the file cannot be parsed, the conversion stops with
input_corrupted. No WEBP is made from it.To go the other way, use WEBP to PNM.
PNM and WEBP.What each format is, and the options this conversion takes.
- 01 · grayscale
Grayscale
Turns colors into shades of gray, which often makes the file smaller.
- 02 · lossless
Lossless
Encodes without losing anything where the format can. The result is identical to the input in pixels or samples, and much bigger than a lossy one.
- 03 · max_height
Max height (px)
Shrinks anything taller than this, keeping its shape. Anything shorter stays as it is, so nothing is ever enlarged.
1 to 20000 - 04 · max_width
Max width (px)
Shrinks anything wider than this, keeping its shape. Anything narrower stays as it is, so nothing is ever enlarged.
1 to 20000 - 05 · quality
Quality
How much detail lossy compression keeps. Higher keeps more detail and makes a bigger file. Above 90 the file grows quickly while the picture barely changes.
1 to 100 default 90 - 06 · rotate
Rotate
Turns the result clockwise by a quarter, a half or three quarters.
90 · 180 · 270
The formats
Portable Anymap
Portable anymap images, the simplest raster format: PBM, PGM and PPM.
- Extensions
- .pnm .ppm .pgm .pbm
- MIME type
- image
/x -portable -anymap - Kind
- Images
WebP
Google's web image format with lossy and lossless modes, alpha and animation. Smaller than JPEG and PNG.
- Extensions
- .webp
- MIME type
- image
/webp - Kind
- Images
In your code.The same PNM to WEBP conversion through the API, for your app or your agent.
$ cv convert photo.pnm photo.webp$ cv convert photo.pnm photo.webpQuestions.What people ask about PNM to WEBP.
Yes. The width and height stay the same unless you set Max width or Max height. Those only shrink a larger picture.
Not by default. It is lossy at Quality 90 unless you turn on Lossless. With Lossless on, the result is identical to the input in pixels or samples.
PBM, PGM and PPM files are all portable anymap images, and they use the extensions pnm, ppm, pgm and pbm.
The file could not be parsed. The conversion stops with input_corrupted and gives no WEBP.