I’ve tried to load these PNG images with the load function but it loads the image as a matrix of RGB pixels.
What parameters could be passed to the load function to get the image loaded as a matrix of bytes?
If we’re loading it as an RGB, it’s presumably a problem with Labelme: it should be saving the images as grayscale, not RGB.
Our image-loading libraries would load a single-channel, single-byte image as Gray{N0f8}, but you can get back to integers with rawview(channelview(img)).
Also, I analyzed the image and found that they used 8bit format, but PNG is paletted - so if there any function in Images that allow to read palette from PNG file?