ImageMagick is breaking palette of PNG image while cropping/chopping

26 Views Asked by At

I try to crop a PNG image with ImageMagick, but it's breaking the original palette.

My command is:

$ convert e11.png -gravity East -chop 70x0 e11-out.png

And here is what it does:

Original:

Original

Chopped:

Chopped

As you see the pallet is now screwed. How to fix it?

1

There are 1 best solutions below

0
Onkeltem On

Answering to myself.

It was a bug in my specific version of ImageMagick: 6.9.11-60. This version is the most recent one in the main Ubuntu 22.04 repository.

However the behavior is correct on ImageMagick 7.1.1.