Page 2 of 2

Re: change PNG endian without a pipe (need -set endian LSB/M

Posted: 2014-01-30T04:03:43-07:00
by thomas12
I found the new switch in the current public version of IM 6
SVN revision 14676 (2014-01-29 6.8.8-4)
but I can't find the right syntax

first check binary IM_MOD_RL_png_.dll for the new option png:swap-bytes:

Code: Select all

> strings.exe ImageMagick-6.8.8-Q16\modules\coders\IM_MOD_RL_png_.dll | grep swap
png:swap-bytes
png_set_swap
but this samples doesn't switch the bytes:

Code: Select all

ImageMagick-6.8.8-Q16\convert.exe -define png:swap-bytes t1.png -auto-level test.jpg
ImageMagick-6.8.8-Q16\convert.exe -define png:swap-bytes=on t1.png -auto-level test.jpg
ImageMagick-6.8.8-Q16\convert.exe -define png:swap-bytes=on png:t1.png -auto-level test.jpg
etc.
check version

Code: Select all

> convert.exe -version
Version: ImageMagick 6.8.8-3 Q16 x64 2014-01-19 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib
thanks for help

Re: change PNG endian without a pipe (need -set endian LSB/M

Posted: 2014-01-30T10:57:34-07:00
by glennrp
There appears to be a sign error in the test for png:swap-bytes. The first of your example commandlines is the correct one but they should all work.

edit: Fix is checked in to SVN for ImageMagick-6.8.8-5. The problem was that coders/png.c used GetNextImageProperty() instead of GetImageOption().