I need to generate images files from a pixel map, with file size and browser decoding being the premium at a rate of 20 frames per second. I am currently using a monochromatic approach to generate the smallest file size, but really need more color information, and was looking to change to either 2 bits per pixel to support 4 colors, or 4 bits per pixel implementations to support 8 colors in the color table. Qt supports monochromatic file generation at 1 bpp using format "Format_mono", but then jumps to 8 bits per pixel via "Format_indexed8", providing no format enumeration for 2 bpp or 4 bpp. This type of indexed encoding is theoretically possible, and various file formats including BMP and GIF are supposed to support 2 and 4 bpp. However, I can get neither QImage nor something like Photoshop to generate indexed images with a color table that has at least 4 colors as anything but 8 bpp.
Does this suggest that 4 bpp file formats have gone out of style and are perhaps not support for rendering in most common browsers. It seems that perhaps Qt had this support sometime in the distant past. Is there a way to get QImage to save content into either 2 bpp or 4 bpp formats?
Bookmarks