----------------
here we discussed about PNG images with wrong byte order
viewtopic.php?f=2&t=24818
We can simple change the byte order with the new switch png:swap-bytes (thanks to glennrp)
Code: Select all
> convert -define png:swap-bytes t1.png -auto-level t3.png
Code: Select all
> convert -version
Version: ImageMagick 6.8.8-5 Q16 x64 2014-02-08 http://www.imagemagick.org
> convert t1.png gray:- | convert -depth 16 -endian msb -size 320x240 gray:- -auto-level t3.png
----------
with the current version of IM 6.8.9-5 Q16 x86 I get this result
Code: Select all
> convert -version
Version: ImageMagick 6.8.9-5 Q16 x86 2014-06-26 http://www.imagemagick.org
> convert t1.png gray:- | convert -depth 16 -endian msb -size 320x240 gray:- -auto-level t4.png
I get the same wrong result with (x64)
Code: Select all
> convert.exe -version
Version: ImageMagick 6.8.9-5 Q16 x64 2014-06-26 http://www.imagemagick.org
It's a bug?
----------------------------------------------------
curious, but this byte switching pipe works fine
Code: Select all
> convert -version
Version: ImageMagick 6.8.9-5 Q16 x64 2014-06-26 http://www.imagemagick.org
> echo ABCDEF | convert -endian msb -size "3X1" -depth 16 gray:- png:- | convert - gray:- | hexdump
00000000: 42 41 44 43 46 45 - |BADCFE|