1 Attachment(s)
[RESOLVED] Convert low-color bitmap to small png
This is a followup to:
[RESOLVED] Save bmp to gif
The solution provided in that thread worked flawlessly. However, the gif size has exceeded the 200k limit, so it no longer works for me.
I started a new thread because I want to focus on just converting to the smallest png possible. Ideally I'd like to expand the map, so I'm hoping we can get this sample bitmap to under 100k in png format.
Attached is the sample bitmap to convert. Specs:
- Any solution is fine; only I will ever run it
- It must be automated
- Produce a png < 200k
Thanks much for any help.
1 Attachment(s)
Re: Convert low-color bitmap to small png
Here's a convert to about 131KB
1 Attachment(s)
Re: Convert low-color bitmap to small png
Oops I meant to upload a zip
1 Attachment(s)
Re: Convert low-color bitmap to small png
Hey Ellis:
I did one more PNG at 4bpp 16 color index. Not a lot of color in the image so it looks okay and is like 65K.
Tom
Re: Convert low-color bitmap to small png
How did you do that? I'm looking for an ongoing solution, since I run these scans every day.
Re: Convert low-color bitmap to small png
Oh man... sorry, I thought you were looking for the end result when in fact you were looking for code.
I use the gdpicture ActiveX in my imaging programs which allows you to create, save, display, manipulate, etc. images in tons of formats and in depth from 1bit to 64bit. (www.gdpicture.com)
I've seen lots of code to save to PNG in VB6 but not any I can recall that allows changing the color depth. If a commercial solution is a consideration gdpicture is a good product.
Sorry for the misunderstanding, Ellis.
Tom
Re: Convert low-color bitmap to small png
No problem. Thanks for the link, but I'm looking for free solution. It doesn't have to be VB6 code; calling out to an external freeware utility would be totally fine.
Re: Convert low-color bitmap to small png
Then how about PngOptimizer? There is a separate command line tool you can use.
For example, it is able to shrink Tom Moran's PNG file from 67364 bytes to 59584 bytes. This with no quality loss at all.
Edit!
Tom Moran's first PNG can be shrunk from 133147 bytes to 77642.
Re: Convert low-color bitmap to small png
Sweet! I think that might do the trick.