randombits
randombits

Reputation: 48450

ImageMagick: `convert` is modifying png24 to png8, any solution?

I am converting some high-res iPhone images to low-res with batch processing using ImageMagick. I simply run the following:

convert [email protected] -resize '50%' image.png

The problem is using pngcheck, it appears that the original @2x file is 32bit (where 8bits are an alpha channel) and in the down sized version, that is stripped away.

pngcheck output (before convert):

OK: [email protected] (85x81, 32-bit RGB+alpha, non-interlaced, 94.6%).

pngcheck output (after convert):

OK: image.png (43x41, 8-bit palette+trns, non-interlaced, 4.8%).

Upvotes: 2

Views: 3021

Answers (1)

Andrew Veselov
Andrew Veselov

Reputation: 471

You can use specifier to force output format.

convert [email protected] -resize '50%' PNG32:image.png

Upvotes: 6

Related Questions