[Insight-users] I intend not to do any compression, how about this situation?

Luis Ibanez luis.ibanez@kitware.com
Tue, 25 Mar 2003 10:16:06 -0500


Hi Hon,

You can convert a color TIFF image into
a color PNG image using the ImageMagick
tool: 'convert'.
http://www.imagemagick.org/www/convert.html

Note that TIFF is quite versatil, much more
than PNG, so whether you will loss data or
not actually depends on the particular type
of TIFF format you are currently using.

For example, TIFF support various schemes for
compression (e.g. Huffman encoding as well as LZW)

If you want to be formal, probably the best option
is to artificially generate a color image of size
4096x4096, fill it up with all the possible
combinations of RGB pixels (256x256x256), then
convert it to PNG and map it back to TIFF and
compare it with the original.

The size of 4096x4096 will provide enough pixels
for holding all possible RGB combinations.


Note that his image will take 50Mb in memory :-)


Regards,


  Luis


------------------------------------------
Hon-Cheng Wong wrote:
> Dear Mathieu:
>          I intend not to do any compression to my images,
> and my images are in color, not grayscale. I just want to
> convert them from TIFF to PNG using ImageMagick
> in order to let ITK to read them.
>  
>           How about this situation? Will this convertion
> from TIFF to PNG lead any loss to my original TIFF
> image?
>  
> Thank you again in advance!!
> Hugo
>  
> Hon-Cheng Wong
> Faculty of Information Technology,
> Macau University of Science and Technology,
> Macau, China
>