freeimage.h
FreeImage_CreateICCProfile
DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);
Crea un nuevo bloque FIICCPROFILE a partir de los datos de perfil ICC leído previamente desde un fichero o construido mediante un sistema de manipulación de color. Los datos de perfil son adjuntados al mapa de bits. La función devuelve un puntero a la estructura FIICCPROFILE creada.
// this code assumes there is a bitmap loaded and // present in a variable called ‘bitmap’ DWORD size = _filelength(fileno(hProfile)); // read profile data from file and zero-terminate if (size && (data = (void *)malloc(size + 1))) { size = fread(data, 1, size, hProfile); *(data + size) = 0; // attach retrieved profile data to bitmap FIICCPROFILE *profile = FreeImage_CreateICCProfile (bitmap, data, size); free (data); }