decode pdf image /FlateDecode /RunLengthDecode

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
martin0
Posts: 10
Joined: 2016-11-03T03:40:30-07:00
Authentication code: 1151

decode pdf image /FlateDecode /RunLengthDecode

Post by martin0 »

Hi,
I have a pdf with an image having the filters /FlateDecode /RunLengthDecode (in that order)


I've seen table PS/PDF Compression Meanings
in http://www.imagemagick.org/Usage/formats/

which explains they are equivalent to
"-compress zip"
and
"+compress"
"-compress rle"
    any thing else

respectively.

I'm unclear what the + means in +compress. Also I'm unclear whether these filters should be run sequentially or are alternatives.
I need to decode this image programmatically.

Any advice received most gratefully
Kind Regards
Martin
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: decode pdf image /FlateDecode /RunLengthDecode

Post by snibgo »

"-compress" specifies a type of compression for an output. Each output can have only one compression type. Not all file format types can use all compression methods. See http://www.imagemagick.org/script/comma ... p#compress

"+compress" means the same as "-compress None", no compression.

"-compress RLE" is run-length encoding. This can be effective for solid-colour graphics, but not photographs.
snibgo's IM pages: im.snibgo.com
martin0
Posts: 10
Joined: 2016-11-03T03:40:30-07:00
Authentication code: 1151

Re: decode pdf image /FlateDecode /RunLengthDecode

Post by martin0 »

Hi snibgo, Thanks for that. I'll try to make more sense of the pdf.

Martin
Post Reply