[fpc-pascal] Imagemagick: magickwand doesn't convert to TIFF 1 bit
José Mejuto
joshyfun at gmail.com
Mon Sep 15 00:54:47 CEST 2014
El 13/09/2014 17:34, Reinier Olislagers escribió:
> (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.
--
More information about the fpc-pascal
mailing list