Performance and PNG's

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
mtdimich

Performance and PNG's

Post by mtdimich »

We are looking at using ImageMagic to convert multiple page PDF's to PNG colour type 3 images. First question:

The syntax I used to create the type3 PNG's was:
convert inputFile -type Palette outputFile

Will that give me a PGN with colour type 3? Or is there a way to verify that?

Second question:
How does ImageMagic scale from a performance perspective? Is there any data as far as conversions/min of any type out there for ImageMagick?

Thanks!
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Post by glennrp »

You can check the PNG color type with
  • identify -debug coder -log %e file.png
and look for a line saying "PNG color_type N"

The performance of writing PNG files is mostly governed by the
time used in the "deflate" compression which is proportional to
the number of pixels in the image.
mtdimich

creating PNG with Color Type 3

Post by mtdimich »

Thanks,

Now I thought that I was using the right syntax to create a PNG with color type 3 but it turns out I wasn't. I have tried:

convert image.pdf -type Palette outimage.png

and

convert image.pdf -channel Index outimage.png

Any thoughts?

Thanks!
Matt
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: creating PNG with Color Type 3

Post by glennrp »

mtdimich wrote: Thanks,

Now I thought that I was using the right syntax to create a PNG with color type 3 but it turns out I wasn't. I have tried:

convert image.pdf -type Palette outimage.png

and

convert image.pdf -channel Index outimage.png

Any thoughts?

Thanks!
Matt
  • -colors 255
Post Reply