Weird bug compressing with pallet

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
QpgDev
Posts: 1
Joined: 2017-07-12T22:30:18-07:00
Authentication code: 1151

Weird bug compressing with pallet

Post by QpgDev »

I've use ImageMagick to convert/compress 100k images and haven't seen this before.

>> What is unique with this image?

>> Is there something else I need to support transparency in the pallet?
--
Here's the original logo (png): (1.84 KB)
Image
--
Here's what happens when I compress with -pallet: (699 bytes)
Image
magick.exe 179588.png -colors 256 -quality 90 -depth 8 -define png:compression-level=9 -define png:compression-filter=0 -define png:compression-strategy=0 -type palette -strip 179588_compressed_with_pallet.png
--
Here's what happens when I compress without -pallet: (2.08 KB)
Image
magick.exe 179588.png -colors 256 -quality 90 -depth 8 -define png:compression-level=9 -define png:compression-filter=0 -define png:compression-strategy=0 -strip 179588_No_Pallet.png
===========
More information:
  • "-type pallet" seems to be what causes all the problems.
  • PhotoShop can read the file and the problem still occurs when I resave from PhotoShop.
  • The image does have a transparent background.
  • TinyPng compresses it correctly with no loss.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Weird bug compressing with pallet

Post by snibgo »

You say:
QpgDev wrote:"-type pallet" seems to be what causes all the problems.
What problem? That transparency (alpha) isn't saved? The "palette" type doesn't save alpha.

But "-type PaletteAlpha" does.
snibgo's IM pages: im.snibgo.com
Post Reply