I want to convert TIF
to an image type that is viewable in a web page.
The 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:
Orignal TIF
is 7KB (bit depth: 1).
Converted to:
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 BMP
and PNG
maintain the same bit depth as the TIF
. Is there a way to reduce the GIF
or 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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With