
All I managed to do at this moment is either export only R, G and B 5 bit values (without alpha):
Code: Select all
convert -depth 5 accept.png bgr:accept.binIs there any way to achieve what I want with ImageMagick?

Code: Select all
convert -depth 5 accept.png bgr:accept.binCode: Select all
stream -map rgb -storage-type short 111.png output.binCode: Select all
stream -map rgb -depth 5 111.png output.binCode: Select all
convert -size 512x512 -depth 8 image.rgba \
            -channel R +level 0,31 -evaluate multiply 2048 +channel \
            -channel G +level 0,31 -evaluate multiply 64 +channel \
            -channel B +level 0,31 -evaluate multiply 2 +channel \
            -channel A +level 0,1 +channel \
            -channel RGBA -separate +channel 
            -channel R -evaluate-sequence add  +channel \
            -depth 16   R:image