[vtkusers] Re: vtkBMPReader 8 bits???

Jeremy Winston jbw at ieee.org
Tue Feb 1 10:24:20 EST 2005


Goodwin Lawlor wrote:
> Hi Pierre-Jean,
> 
> From the source code it looks like vtkBMPWriter writes out 24 bpp even if
> you only have 8 bpp... you'll get three identical RGB channels. Why not try
> a different format, vtkPNGReader/Writer for example... its lossless AFAIK

Yep, PNG is lossless, and on images with lots of areas
of uniform color, it does better than GIF, JPEG (at
low levels of lossy-ness) & TIFF.

BMP allows compression, but is almost always found
uncompressed in practice, so even if you had 8-bit,
the image sizes would be larger than necessary.

Cf. http://www.libpng.org/pub/png/pngintro.html
and http://www.faqs.org/faqs/graphics/fileformats-faq/part3/section-18.html

HTH,
-Jeremy



More information about the vtkusers mailing list