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.
--
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal