Page 1 of 1
PCX without RLE (uncompressed)
Posted: 2010-09-03T09:33:31-07:00
by giner
It's not possible to convert bmp to pcx without RLE compression
Code: Select all
$ convert test.bmp test.pcx; file test.pcx
test.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [590, 117], 8-bit colour, 72 x 72 dpi, RLE compressed
$ convert -compress none test.bmp test.pcx; file test.pcx
test.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [590, 117], 8-bit colour, 72 x 72 dpi, RLE compressed
$ convert +compress test.bmp test.pcx; file test.pcx
test.pcx: PCX ver. 3.0 image data bounding box [0, 0] - [590, 117], 8-bit colour, 72 x 72 dpi, RLE compressed
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T14:20:41-07:00
by fmw42
try
convert image.pcx -compress none image.bmp
see
http://www.imagemagick.org/Usage/basics/#cmdline
Don't know if that will help, but it is the more correct syntax.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T15:01:30-07:00
by giner
Do you mean convert image.bmp -compress none image.pcx? It produces the same result.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T15:31:16-07:00
by fmw42
Do you mean convert image.bmp -compress none image.pcx? It produces the same result.
Sorry I had it backwards. But I am not a Windows expert so know little about Windows file formats. I am on a Mac. You my need help from a windows expert or the IM folks.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T15:55:04-07:00
by giner
fmw42 wrote:Do you mean convert image.bmp -compress none image.pcx? It produces the same result.
Sorry I had it backwards. But I am not a Windows expert so know little about Windows file formats. I am on a Mac. You my need help from a windows expert or the IM folks.
Windows? I'm not a windows user
Thanks for helping. Anyway I think this is a bug.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T16:43:45-07:00
by Drarakel
The RLE compression is hardcoded (in pcx.c). I wouldn't call this a bug, as it's the intended behaviour in ImageMagick (and changing this would require a rewrite of some parts in the concerning method). I think, that's similar to GIF - that format also can't be saved without compression anymore in IM.
But I agree that it would be preferable if one could change these things at the commandline.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T16:50:27-07:00
by el_supremo
The PCX coder always writes the image with RLE compression.
Pete
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T17:36:55-07:00
by fmw42
el_supremo wrote:The PCX coder always writes the image with RLE compression.
Pete
Pete,
That was my thought also, but according to
http://www.fileformat.info/format/pcx/egff.htm, uncompressed seems to be permitted even if the IM coder does not permit it or is IM using some delegate for that?
Fred
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T18:14:57-07:00
by Drarakel
As far as I can see, it's all in coders/pcx.c (including the compression, which gets done in the PCXWritePixels method).
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T18:25:56-07:00
by el_supremo
The IM coder writes the file, there's no delegate.
This file
http://www.fileformat.info/format/pcx/egff.htm says:
Code: Select all
PCX files, however, always contain encoded image data, and currently the only valid value for the encoding field is 1.
This file
http://www.qzx.com/pc-gpe/pcx.txt, which is supposed to be ZSoft's documentation of the PCX format, only talks about the file being encoded. It does not explicitly say anywhere that an uncompressed file is an option.
However, I modified my version of IM so that the coder will write an uncompressed PCX image and converted the rose: image to uncompressed rose.pcx. IrfanView and XnView can display the file but Paint Shop Pro can't.
@Magick: Let me know if you want my code to allow uncompressed PCX.
Pete
Re: PCX without RLE (uncompressed)
Posted: 2010-09-03T18:48:28-07:00
by fmw42
Pete,
All I looked at was the table at the top of the file referenced above where it says:
Compression RLE, uncompressed
Fred
However, it is likely that Magick will take your code and allow IM to make uncompressed PCX files.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-04T07:59:12-07:00
by magick
We can reproduce the problem you reported and have a patch in ImageMagick 6.6.4-0 to support PCX compression. Thanks.
Re: PCX without RLE (uncompressed)
Posted: 2010-09-19T22:29:40-07:00
by giner
Thank you very much for the quick fix!
Stas