Imagemagick: magickwand doesn't convert to TIFF 1 bit

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Imagemagick: magickwand doesn't convert to TIFF 1 bit

Reinier Olislagers
(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 ;) )

Thanks,
Reinier
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Imagemagick: magickwand doesn't convert to TIFF 1 bit

José Mejuto
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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Imagemagick: magickwand doesn't convert to TIFF 1 bit

Reinier Olislagers
On 15/09/2014 00:54, 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

[PATCH] Re: Imagemagick: magickwand doesn't convert to TIFF 1 bit

Reinier Olislagers


On 15/09/2014 09:43, Reinier Olislagers wrote:
> Mantis issue
> http://mantis.freepascal.org/view.php?id=26723

Test case and patch attached to bugtracker issue.

Thanks,
Reinier


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal