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?
convert your.BMP newname.GRAYthey have pretty stupid documentation. I looked here imagemagick.org/script/formats.php - talexconvert -list Format- sercxjo