how I could reduce ppm file size with imagemagick ?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

how I could reduce ppm file size with imagemagick ?

Post by diegomage »

I use a potrace software for get more precise vectorize but when I use much this software obtain a large ppm of 24mb

How I could reduce size of this ppm

Please help me


Image

when I convert this image in ppm this expand to 24mb

convert Qe5ND.png imss.ppm
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how I could reduce ppm file size with imagemagick ?

Post by fmw42 »

The PNG is grayscale palette, so is very small. PPM is 24 bit color.PGM is 8-bit grayscale. I do not know if NetPBM supports a palette type.

If you use PGM, you reduce your file size to 1/3, though still much larger than your original png.

Code: Select all

convert Qe5ND.png img.pgm

Code: Select all

identify Qe5ND.png img.pgm
Qe5ND.png PNG 3994x2122 3994x2122+0+0 8-bit sRGB 256c 116096B 0.000u 0:00.000
img.pgm PGM 3994x2122 3994x2122+0+0 8-bit Grayscale Gray 8.08266MiB 0.020u 0:00.019
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: how I could reduce ppm file size with imagemagick ?

Post by diegomage »

very thankyou this help me so much
Post Reply