Subject: Re: sun visualization file format

From: [email-masked] (Himanshu Gohel (DMIP))
Date: 6 Feb 1995 18:52:11 GMT

In article <[email-masked]>, [email-masked] (serhat akin) writes:
> hi I would like to convert sun visualization file format (vff) to tiff 
> or targa. I recently converted them to sun raster format and then to tiff 
> or targa. Ok it works, but the problem is while converting sun vff to 
> sun ras it reduces 24 bit info to 8 bits. Any software or info will be 
> greatly appreciated.

Hmmm...SunVision's VFF image format doesn't have a 24-bit support, so I'm
not sure whether you're dealing with 16-bit or 32-bit images here.  Anyway,
basically SunVision's VFF image file format is very simple - it consists
of an ASCII header, which is very self explanatory, and which is followed by
a ctrl-L (^L) to indicate end of header, and then binary data (could be ASCII
too, but I don't think many people use that format - the files would be too
big).

So if you had a 16-bit file, all you have to do is to cut everything above
the ^L and then you have a flat file which contains your image.

In case of 32-bit images, the data is stored as such (according to the man page):

ABGRABGR...

(Alpha, Blue, Green, Red...)

Sun's Raster Image format will be 8-bit, so you will certainly lose info
if you use that as an intermediate step.

Hope that helps you get started.

-- 
Himanshu Gohel, [email-masked]
WEB URL: http://www.csee.usf.edu/~gohel
Digital Medical Imaging Program (DMIP)
University of South Florida, Tampa, FL.  USA