Convert PNM to JPG
Turn PNM images into JPEG. Same size, at quality 90 unless asked otherwise.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop PNM files on the dialor turn it to pick what to do
A JPG from a PBM, PGM or PPM file.The picture keeps its width and height. Quality is 90 unless you change it.
What you get
One JPG made from your PNM file. PNM covers PBM, PGM and PPM, and all three are read. The JPG has the same width and height as the original.
JPG compresses with loss, so the result is not a pixel-for-pixel copy of the source. Quality is set to 90 unless you choose another value.
Options
Set Quality to a value from 1 to 100. Higher keeps more detail and makes a bigger file. Above 90 the file grows quickly while the picture barely changes.
Set Max width or Set Max height to shrink a large picture. The shape is kept, and a picture that is already smaller stays as it is, so nothing is enlarged. Both accept values from 1 to 20000.
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. The PNM file is damaged or is not a valid PNM file.To go the other way, use JPG to PNM.
PNM and JPG.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 · 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 - 03 · 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 - 04 · 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 - 05 · 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
JPEG
Lossy photo compression that every device and browser opens. Small files, no transparency.
- Extensions
- .jpg .jpeg .jfif .jpe
- MIME type
- image
/jpeg - Kind
- Images
In your code.The same PNM to JPG conversion through the API, for your app or your agent.
$ cv convert photo.pnm photo.jpg$ cv convert photo.pnm photo.jpgQuestions.What people ask about PNM to JPG.
Yes. The width and height stay the same unless you set Max width or Max height.
Yes. PBM, PGM and PPM are all forms of PNM, and each becomes a JPG.
Yes. JPG uses lossy compression, so some detail is lost. A higher Quality keeps more of it.
The file could not be parsed, so the conversion stops. No JPG is made from it.