I want to convert
TIF to an image type that is viewable in a web page.
TIFs are black and white so
JPG does not work well at all and ends up even larger after conversion.
Here are some tests I have performed using C# and
Image.Save to do the conversion:
TIF is 7KB (bit depth: 1).
I then converted a multipage
TIF which has 3 pages. Original size was 134KB (bit depth: 1).
Converted 3 images totals:
I am starting with a multipage
TIF and I need to convert to be viewable in a browser. It looks like
PNG would be the best format to use based on my basic tests I have outlined above. Are there other image formats that I should be using / considering?
Are the any other options I am missing to get the file size down?
EDIT: I haved added more information regarding the bit depth of each format. The
PNG maintain the same bit depth as the
TIF. Is there a way to reduce the
JPG bit depth to hopefully reduce the size significantly?
PNG is certainly your best choice here.
The reason your PNG ends up larger than the original TIF might be that the runtime doesn't do all the compression it possibly could. If you really need to compress every last little byte out of the PNG file, I would suggest using a tool like AdvancePNG or OptiPNG in order to compress the PNGs after you write them out. The author of OptiPNG has written a good article with links to a few other PNG optimizers.
Use PNG, it supports 1-bit color mode and works even in IE4 (if you don't need partial transparency). Do your customers use IE3?
A few years ago I might have shied away from PNG, but now it just works. and there are plenty of hack scripts to get it to work with IE 5 and 6 so you can be safe for most users. If you really need compatibility offer both GIF & PNG.