Anna Shleyfman

Spring 2000

Implementation of Compositing Digital Images paper by Thomas Porter and Tom Duff for TIFF format images

 

 

For this project I reused my Tiff reader and Writer to deal with transparency. Unfortunately, the original implementation completely ignored the a -channel. I had to change the image processing part of the program. There are three different ways to store transparency information in tiff files. One of them is to pre-multiply the original color information by a , i.e. each pixel will be represented as (ra , ga , ba , a ). The second way is to have a that is not associated with the pixel color, i.e. (r, g, b, a ). The third way is to store the transparency information in transparency matrix. This third way is not currently implemented in the program.

To convert transparent images to readable format by my tiff reader/writer program use imgview to add transparency and to save this file in GIF format. Then close it, and reopen with the newly created gif. (If you won’t close it imgview will dump core). Save this file using imgview in the TIFF format. Make sure that the pixel information is stored in the RGBA format with no compression. You are done. Use Tiffread command to read it by tiff reader/writer.

The following images were manipulated in the project:

 

The following operators were applied:

Operation:

Image A:

Image B:

Resulting image:

diffuse 0.5

Pooh.tif

 

over

Buzz.tif

Land.tif

atop

Buzz.tif

Land.tif

out

Buzz.tif

Land.tif

over

Text.tif

Lake.tif

out

Text.tif

Lake.tif

in

Dino.tif

Eor.tif

xor

Dino.tif

Eor.tif

plus

Eor.tif

Dino.tif

 

Note: In current implementation of the program when image is written out, using command Tiffwrite the transparency information is lost, i.e. the image will have just the pixel information required for the image to be displayed.

For further description of the Tiff reader and writer please consult it’s specifications at http://www.cc.gatech.edu/classes/cs4390_98_winter/