The package contains patches enabling creation of FIBITMAP from user bits without copying the data.
Except the files provided you need to add:
DLL_API FIBITMAP * DLL_CALLCONV FreeImage_AllocateHeaderForBits(BYTE* bits, unsigned pitch, FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBitsEx(BOOL copySource, BYTE *bits, FREE_IMAGE_TYPE, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
One will use FreeImage_ConvertFromRawBitsEx to create a new FIBITMAP*, passing false for the first argument, avoiding creation of private storage for the pixels.
One must use FreeImage_Unload as unusual to release the header and metadata!
Included are two test cases. One for OpenCV and one for Qt's QImage. In both cases the image is loaded and saved by FreeImage, but processed by the other frameworks without any unnecessary copies.