SubName: LoResPNG
Description: Make PNG files smaller by limiting the colors in them
Code: See attached Zip file
Dependencies: BitmapExtended
Tags: PNG
Hello:
For some time I have been trying to make PNG files I write out a little smaller.
By smaller I mean from 80k to less than 50k.
Now I know a lot of you will think this is not worth doing but my golf program tends to be used more in Rural areas where 1x is more common than 3x. So saving 40k in a file to be Emailed is a big.
Playing around with PNG files I came up with a way of changing some of the color bytes and still keep the quality worth looking at. I use BitmapExtended to reduce the bitmap size by 50% which takes the file from around 125K to the 82K and then I run my LoResPNG software on it.
Here are the results before and after LoResPNG:
GolfScoreRound is the original file - 82,178 bytes
GolfScoreRound-16Colors is the reduced file - 36,488 bytes
I have also tried 8 colors to save a little more but gets a tad darker then I would like
I have done EVERYTHING I could think of to try and make performance good. In fact I fine how much savings there are compared to how LITTLE time it takes to be more than worth while
Attached is the LoResPNG.zip file
Hope this helps someone out.
Enjoy
BobVal
Description: Make PNG files smaller by limiting the colors in them
Code: See attached Zip file
Dependencies: BitmapExtended
Tags: PNG
Hello:
For some time I have been trying to make PNG files I write out a little smaller.
By smaller I mean from 80k to less than 50k.
Now I know a lot of you will think this is not worth doing but my golf program tends to be used more in Rural areas where 1x is more common than 3x. So saving 40k in a file to be Emailed is a big.
Playing around with PNG files I came up with a way of changing some of the color bytes and still keep the quality worth looking at. I use BitmapExtended to reduce the bitmap size by 50% which takes the file from around 125K to the 82K and then I run my LoResPNG software on it.
Here are the results before and after LoResPNG:
GolfScoreRound is the original file - 82,178 bytes
GolfScoreRound-16Colors is the reduced file - 36,488 bytes
I have also tried 8 colors to save a little more but gets a tad darker then I would like
I have done EVERYTHING I could think of to try and make performance good. In fact I fine how much savings there are compared to how LITTLE time it takes to be more than worth while
Attached is the LoResPNG.zip file
Hope this helps someone out.
Enjoy
BobVal
Attachments
Last edited: