Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-09

Imagemagick: magickwand doesn't convert to TIFF 1 bit

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

José Mejuto
to Reinier Olislagers
Reinier Olislagers wrote 10 lines
(Earlier posted on forum) See subject - I've posted this on stackoverflow http://stackoverflow.com/questions/25719495/magickwand-conversion-to-tiffccitt-group-4-compression-gives-uncompressed-image Link to example program + demo image is included in that question. Hope some of you guys can help solve this for me - and earn a StackOverflow bounty in the process (if that helps ;) )

Hello,

For some reason the bindings in Pascal, and/or the wand bindings (maybe internally to imagemagick) are broken.

Use this enumeration to get the expected result in the TIFF module:

-----------------
UndefinedCompression,
NoCompression,
BZipCompression,
DXT1Compression,
DXT3Compression,
DXT5Compression,
FaxCompression,
Group4Compression,
JPEGCompression,
JPEG2000Compression, /* ISO/IEC std 15444-1 */ LosslessJPEGCompression,
LZWCompression,
RLECompression,
ZipCompression,
ZipSCompression,
PizCompression,
Pxr24Compression,
B44Compression,
B44ACompression,
LZMACompression, /* Lempel-Ziv-Markov chain algorithm */ JBIG1Compression, /* ISO/IEC std 11544 / ITU-T rec T.82 */ JBIG2Compression /* ISO/IEC std 14492 / ITU-T rec T.88 */ ------------------

So in your code use:

     status := MagickSetImageCompression(wand,CompressionType(7));
     if (status = MagickFalse) then HandleError;

I had downloaded the imagemagick sources in order to reach this fact.

Reply by email

Reinier Olislagers
to José Mejuto
José Mejuto wrote
El 13/09/2014 17:34, Reinier Olislagers escribió: For some reason the bindings in Pascal, and/or the wand bindings (maybe internally to imagemagick) are broken.

Mmmm, if the wand bindings were broken that would surely have lead to many more people complaining and it getting fixed?

Use this enumeration to get the expected result in the TIFF module:

Great, thanks a LOT - that does solve the problem!

Mantis issue
http://mantis.freepascal.org/view.php?id=26723

Reply by email