Image corrupted when converted to pixel cache

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
balaprassanna
Posts: 5
Joined: 2018-06-11T02:46:14-07:00
Authentication code: 1152

Image corrupted when converted to pixel cache

Post by balaprassanna » 2018-06-11T02:58:07-07:00

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
Last edited by balaprassanna on 2018-06-11T23:49:15-07:00, edited 3 times in total.

snibgo
Posts: 10699
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Image corrupted when converted to pixel cache

Post by snibgo » 2018-06-11T03:08:27-07:00

-resize\>
Why do you have a ">"? That is bad syntax, in v6 and v7.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 23840
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image corrupted when converted to pixel cache

Post by fmw42 » 2018-06-11T10:22:00-07:00

Perhaps you want -resize 1600x1600\> or "1600x1600>"

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

balaprassanna
Posts: 5
Joined: 2018-06-11T02:46:14-07:00
Authentication code: 1152

Re: Image corrupted when converted to pixel cache

Post by balaprassanna » 2018-06-11T23:08:08-07:00

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

snibgo
Posts: 10699
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Image corrupted when converted to pixel cache

Post by snibgo » 2018-06-12T00:44:53-07:00

balaprassanna wrote:... looks different ...
Please be more precise. In what way does it look different?
snibgo's IM pages: im.snibgo.com

balaprassanna
Posts: 5
Joined: 2018-06-11T02:46:14-07:00
Authentication code: 1152

Re: Image corrupted when converted to pixel cache

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


User avatar
fmw42
Posts: 23840
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image corrupted when converted to pixel cache

Post by fmw42 » 2018-06-12T09:36:56-07:00

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?

balaprassanna
Posts: 5
Joined: 2018-06-11T02:46:14-07:00
Authentication code: 1152

Re: Image corrupted when converted to pixel cache

Post by balaprassanna » 2018-06-12T23:54:47-07:00

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

User avatar
magick
Site Admin
Posts: 10841
Joined: 2003-05-31T11:32:55-07:00

Re: Image corrupted when converted to pixel cache

Post by magick » 2018-06-13T03:15:01-07:00

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.

balaprassanna
Posts: 5
Joined: 2018-06-11T02:46:14-07:00
Authentication code: 1152

Re: Image corrupted when converted to pixel cache

Post by balaprassanna » 2018-06-23T22:53:16-07:00

Can you explain what went wrong or share the changeset. So that we will have an insight if we face something similar again.

User avatar
magick
Site Admin
Posts: 10841
Joined: 2003-05-31T11:32:55-07:00

Re: Image corrupted when converted to pixel cache

Post by magick » 2018-06-24T05:30:29-07:00

The problem was a bug in the PNG coder. The image attributes did not match the morphology of the image pixels.

Post Reply