It is necessary to convert bmp image 32x32 pixels to single-channel (only gradations of brightness) with a color depth of 256 levels. And remove the metadata from the file.

Now the file with the header weighs 3210 bytes. This is 3 bytes per pixel: 1024 * 3 = 3072 plus the header.

It is necessary that the weight is 1024 bytes, that is 32 * 32 * 1 = 1024 - so that after convection there is only a matrix of pixels, where only 1 byte per pixel.

Tell me, please, how can this be done, preferably using imagemagick?

  • The format you want is extremely non-standard. There is hardly anything ready. - talex
  • Although you can try to convert your.BMP newname.GRAY they have pretty stupid documentation. I looked here imagemagick.org/script/formats.php - talex
  • They have the best - this is help in the command itself: convert -list Format - sercxjo
  • Thank you all for responding. I will try the convert your.BMP option newname.GRAY - RomkaKraynov

1 answer 1

from comments:


You can try to convert your.BMP newname.GRAY . watched here .

The best thing for them is the help in the command itself: convert -list Format .