#include "tiffio.h" #include "tiffiop.h" #include "lcms.h" // // This snippet shows how to deal with Embedded profiles in TIFF // files using Sam Leffer's library. // // This is given as an example, and does *NOT* compile unless // you replace "Bank" variables with your TIFF struct. cmsHPROFILE TIFFGetColorProfile(void) { DWORD Len; LPVOID Buffer; cmsHPROFILE hProfile; if (TIFFGetField(Bank, TIFFTAG_ICCPROFILE, &Len, &Buffer)) { hProfile = cmsOpenProfileFromMem(Buffer, Len); _TIFFfree(Buffer); return hProfile; } else return NULL; } int TIFFEmbbedColorProfile(LPVOID Buffer, LONG Len) { return TIFFSetField(Bank, TIFFTAG_ICCPROFILE, Len, Buffer); }