Page 1 of 1

Image corrupted when converted to pixel cache

Posted: 2018-06-11T02:58:07-07:00
by balaprassanna
I have an image which is converted to pixel cache format .mpc and then resized to 1600x1600 using the following commands

convert image.png pixelcache.mpc

convert pixelcache.mpc -resize 1600x1600\> resized.png

The resized.png image looks different in the latest version of imagemagick (v7.0.7-38). However, this works in older versions of imagemagick (v7.0.5-4).

https://drive.google.com/open?id=1Z3d1d ... BFD1dPu2Ta

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-11T03:08:27-07:00
by snibgo
-resize\>
Why do you have a ">"? That is bad syntax, in v6 and v7.

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-11T10:22:00-07:00
by fmw42
Perhaps you want -resize 1600x1600\> or "1600x1600>"

See http://www.imagemagick.org/script/comma ... p#geometry

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-11T23:08:08-07:00
by balaprassanna
This is the right command being used. The resized.png looks different from the original image.
convert pixelcache.mpc -resize 1600x1600\> resized.png

This one is a typographical error. I have edited my question.
convert pixelcache.mpc -resize\> 1600x1600 resized.png

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-12T00:44:53-07:00
by snibgo
balaprassanna wrote:... looks different ...
Please be more precise. In what way does it look different?

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-12T05:32:31-07:00
by balaprassanna

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-12T09:36:56-07:00
by fmw42
If the mpc file comes from a different version of ImageMagick, it may not work on your current version. Also do you have the corresponding .cache file in the same location as the .mpc file?

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-12T23:54:47-07:00
by balaprassanna
The mpc file is being generated by the same version of imagemagick. Yes, i have the .cache file in the same directory as .mpc file. This is working in the older version v7.0.5-4

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-13T03:15:01-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick within a few days. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ within a few days.

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-23T22:53:16-07:00
by balaprassanna
Can you explain what went wrong or share the changeset. So that we will have an insight if we face something similar again.

Re: Image corrupted when converted to pixel cache

Posted: 2018-06-24T05:30:29-07:00
by magick
The problem was a bug in the PNG coder. The image attributes did not match the morphology of the image pixels.