Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey guys, I have a question. I'm having a program that takes screenshots but I need a small file size, so I've been adjusting the Pixel format. I've been using 16 bit RGB565 and I'm just wondering if there is any advantage using RGB555 quality or file size wise? Since 1 bit is un-used, would certain compression algorithms take advantage of that? Or would both files end up the same size (after or before compression) only the RGB565 with a slight higher quality?

I've tried googling it but it seems like there isn't much answers about the certain pixel formats...

Thanks!
Posted

Depending on what's in your screenshots, you might get better compression by using a palette-based compression scheme. Formats like GIF can do that. For example, if there are fewer than 256 different colours on the screen (or you can force that to happen), then you can fit a pixel in one byte before compression. I don't know offhand of any code to do it, but I'm sure it's out there.
 
Share this answer
 
Comments
Mike$7 30-Jul-10 2:19am    
Oddly, I've set the bitmap saving to .Gif and it takes more space to store a .Gif with default pixel format than to store a jpeg with 16 Bit RGB565... The pictures would be all handled by my program and there would no need for any external editors to open my file. Any other suggestions? I'm trying to find some code to save a jpeg file with selectable quality... any links that have a function to input a bitmap to save as a quality-controllable jpeg?
Try saving as a jpeg, that usually gives a small size. Otherwise, just save it as a GIF, as Peter said. You may need to create a 256 color image and draw your image onto it, in order to do the color reduction. Don't use any weird formats like RGB555, no standard file format uses those.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900