https://imagemagick.org/script/download.php#windows convert -size 320x240 -rotate 90 -depth 8 inputfile.jpg \ -channel R +level 0,31 -evaluate multiply 2048 +channel \ -channel G +level 0,63 -evaluate multiply 32 +channel \ -channel B +level 0,31 -evaluate multiply 1 +channel \ -channel RGBA -separate +channel \ -channel R -evaluate-sequence add +channel \ -depth 16 R:outputfile.raw