| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2003.11.18 10:23 "TIFFGetField COLORMAP memory allocation", by Nathan BeckerHi, I'm trying to read the colormap from an RGB palette tiff file using something like ..._TIFFmalloc(red...); ...green... ...blue... TIFFGetField(tiff, TIFFTAG_COLORMAP, &red, &green, &blue); ... _TIFFfree(red); After a bunch of seg faults and screwing around I realized that TIFFGetField seems to secretly allocate the memory for red, green, and blue. Is this right? The documentation seems to indicate I'm supposed to provide allocated memory to TIFFGetField. Also, if it does secretly allocate memory, then am I supposed to free the red, green, blue arrays? It seems like not because doing so gives me a seg fault. thanks in advance for the help, Nathan |
|||||||