Possible bug when saving an image to PCX format.

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
mongoose54

Possible bug when saving an image to PCX format.

Post by mongoose54 »

I have the following code:

Image rotate_frame;

rotate_frame.read("C:\FRAME.bmp");
rotate_frame.rotate(5*180/PI);
rotate_frame.write("C:\ROTATED_FRAME.pcx");

The program saves the file ROTATED_FRAME but when I try to open it with photoshop it says that it is a corrupted file. I removed rotate_frame.rotate(5*180/PI); line and the file is saved and opened normally. Any clues? Probably it is a bug because if i save the image in bmp. it is opened normally. I appreciate any help! Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug when saving an image to PCX format.

Post by magick »

We have a fix for the problem you reported in ImageMagick 6.4.1-9 Beta available sometime tomorrow. Thanks.
mongoose54

Re: Possible bug when saving an image to PCX format.

Post by mongoose54 »

And which files should I overwrite so that the bug is fixed? Bear in my that I use ImageMagick embedded to my Visual Studio C++ project. Thanks a lot for your efforts!Keep up the good job!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug when saving an image to PCX format.

Post by magick »

Reset the alpha channel before you write the PCX image (e.g. image.matte(false)). That should fix the problem. Photoshop may not like PCX 32-bit images with an alpha channel. Without the alpha channel, ImageMagick creates standard 24-bit PCX images which Photoshop probably will not complain about.
Post Reply