TIFF and LibTiff Mail List Archive


1993.09.26 21:12 "Help needed with tiff files...", by Manavendra Misra
1993.09.27 23:10 "Re: Help needed with tiff files...", by Sam Leffler

1993.09.26 21:12 "Help needed with tiff files...", by Manavendra Misra

Hi! I am having some problems in handling color-maps in tiff files, and was hoping that someone more experienced would be able to help me. I am trying something very simple--reading in a tiff file created by Imagetool (under Openwin 3.0, Solaris 2.2), and writing it out into another tiff file (just to test that I am able to read and write tiff files...). I am using Sam's libtiff functions to do so. The file I am reading is a grayscale image, but Imagetool stores it with color map info. After I have read it in my program, and written it out to a new tiff file, and I do a tiffinfo on it, I get:

choma% tiffinfo scaled.tif
scaled.tif: TIFF directory is missing required "Colormap" field.

Of course, I can't display the file using Imagetool.

The question is: how do I read the colormap field, and write it into the new file (I was able to read all the fields with a single parameter using the TIFFGetField, and was able to write them using TIFFSetField, but couldn't figure out a way to do so with multi-parameter fields)?

Another (slightly unrelated) question: I was looking for a tool for scaling an image. Has anyone written such a program? Even more interesting would be a program that provides the user with flexibility to scale the x and y axis differently.

I hope I am not abusing this mailing list--that it is indeed meant for pusposes such as these.

Thanks for any help you can provide!



Manavendra Misra
Stratton Hall 419
Dept of Mathematical and Computer Sciences
Colorado School of Mines
Golden, CO 80401

Ph. (303)-273-3873
Fax. (303)-273-3278