 
 
lib-of-vs-libs-freeImage-FreeImagePlus.h / h
Abstract base class for all objects used by the library.
version: FreeImage 3
author: Hervé Drolon
@name Information functions
A class used to manage all photo related images and all image types used by the library.fipImage encapsulates the FIBITMAP format. It relies on the FreeImage library, especially for loading / saving images and for bit depth conversion. 
version: FreeImage 3
author: Hervé Drolon */ class FIP_API fipImage : public fipObject { protected:DIB data FIBITMAP *_dib; TRUE whenever the display need to be refreshed mutable BOOL _bHasChanged; public: friend class fipMultiPage; public: //@{ 
see: FreeImage_AllocateTfipImage(FREE_IMAGE_TYPE image_type = FIT_BITMAP, WORD width = 0, WORD height = 0, WORD bpp = 0); Destructor ~fipImage(); 
see: FreeImage_AllocateTBOOL setSize(FREE_IMAGE_TYPE image_type, WORD width, WORD height, WORD bpp, unsigned red_mask = 0, unsigned green_mask = 0, unsigned blue_mask = 0); Destroy image data virtual void clear(); //@} //@{ 
see: FreeImage_ClonefipImage(const fipImage& src); 
see: FreeImage_ClonefipImage& operator=(const fipImage& src); 
see: operator FIBITMAP*()fipImage& operator=(FIBITMAP *dib); 
parameter: dst Output subimage
parameter: left Specifies the left position of the cropped rectangle.
parameter: top Specifies the top position of the cropped rectangle.
parameter: right Specifies the right position of the cropped rectangle.
parameter: bottom Specifies the bottom position of the cropped rectangle.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_CopyBOOL copySubImage(fipImage& dst, int left, int top, int right, int bottom) const; The bit depth of dst bitmap must be greater than or equal to the bit depth of src. Upper promotion of src is done internally. Supported bit depth equals to 4, 8, 16, 24 or 32. 
parameter: src Source subimage
parameter: left Specifies the left position of the sub image.
parameter: top Specifies the top position of the sub image.
parameter: alpha Alpha blend factor. The source and destination images are alpha blended if alpha = 0..255. If alpha > 255, then the source image is combined to the destination image.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_Paste */ BOOL pasteSubImage(fipImage& src, int left, int top, int alpha = 256);
parameter: left Specifies the left position of the cropped rectangle.
parameter: top Specifies the top position of the cropped rectangle.
parameter: right Specifies the right position of the cropped rectangle.
parameter: bottom Specifies the bottom position of the cropped rectangle.
returns: Returns TRUE if successful, FALSE otherwise.BOOL crop(int left, int top, int right, int bottom); //@} //@{ 
parameter: lpszPathName Path and file name of the image to load.
parameter: flag The signification of this flag depends on the image to be read.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_Load, FreeImage documentationBOOL load(const char* lpszPathName, int flag = 0); 
see: loadBOOL loadU(const wchar_t* lpszPathName, int flag = 0); 
parameter: io FreeImageIO structure
parameter: handle FreeImage fi_handle
parameter: flag The signification of this flag depends on the image to be read.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_LoadFromHandle, FreeImage documentationBOOL loadFromHandle(FreeImageIO *io, fi_handle handle, int flag = 0); 
parameter: memIO FreeImage memory stream
parameter: flag The signification of this flag depends on the image to be read.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_LoadFromMemory, FreeImage documentationBOOL loadFromMemory(fipMemoryIO& memIO, int flag = 0); 
parameter: lpszPathName Path and file name of the image to save.
parameter: flag The signification of this flag depends on the image to be saved.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_Save, FreeImage documentationBOOL save(const char* lpszPathName, int flag = 0) const; 
see: saveBOOL saveU(const wchar_t* lpszPathName, int flag = 0) const; 
parameter: fif Format identifier (FreeImage format)
parameter: io FreeImageIO structure
parameter: handle FreeImage fi_handle
parameter: flag The signification of this flag depends on the image to be saved.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_SaveToHandle, FreeImage documentationBOOL saveToHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flag = 0) const; 
parameter: fif Format identifier (FreeImage format)
parameter: memIO FreeImage memory stream
parameter: flag The signification of this flag depends on the image to be saved.
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_SaveToMemory, FreeImage documentationBOOL saveToMemory(FREE_IMAGE_FORMAT fif, fipMemoryIO& memIO, int flag = 0) const; //@} //@{ 
see: FreeImage_GetImageTypeFREE_IMAGE_TYPE getImageType() const; 
see: FreeImage_GetWidthWORD getWidth() const; 
see: FreeImage_GetHeightWORD getHeight() const; 
see: FreeImage_GetPitchWORD getScanWidth() const; 
see: operator=(FIBITMAP *dib)operator FIBITMAP*() { return _dib; } Returns TRUE if the image is allocated, FALSE otherwise BOOL isValid() const; 
see: FreeImage_GetInfoBITMAPINFO* getInfo() const; 
see: FreeImage_GetInfoHeaderBITMAPINFOHEADER* getInfoHeader() const; 
see: FreeImage_GetDIBSizeLONG getImageSize() const; 
see: FreeImage_GetBPP, getImageTypeWORD getBitsPerPixel() const; 
see: FreeImage_GetLine, getScanWidthWORD getLine() const; 
see: FreeImage_GetDotsPerMeterXdouble getHorizontalResolution() const; 
see: FreeImage_GetDotsPerMeterYdouble getVerticalResolution() const; 
see: FreeImage_GetInfoHeadervoid setHorizontalResolution(double value); 
see: FreeImage_GetInfoHeadervoid setVerticalResolution(double value); //@} //@{ 
see: FreeImage_GetPaletteRGBQUAD* getPalette() const; 
see: FreeImage_GetColorsUsedWORD getPaletteSize() const; 
see: FreeImage_GetColorsUsedWORD getColorsUsed() const; 
see: FreeImage_GetColorType, FREE_IMAGE_COLOR_TYPEFREE_IMAGE_COLOR_TYPE getColorType() const; 
see: FreeImage_GetBPP, FreeImage_GetColorTypeBOOL isGrayscale() const; //@} //@{ It is up to you to interpret these bytes correctly, according to the results of FreeImage_GetBPP and GetRedMask, FreeImage_GetGreenMask and FreeImage_GetBlueMask.<br> Use this function with getScanWidth to iterates through the pixels. 
see: FreeImage_GetBits */ BYTE* accessPixels() const;
see: FreeImage_GetScanLine, FreeImage documentationBYTE* getScanLine(WORD scanline) const; 
parameter: x Pixel position in horizontal direction
parameter: y Pixel position in vertical direction
parameter: value Pixel index (returned value)
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_GetPixelIndexBOOL getPixelIndex(unsigned x, unsigned y, BYTE *value) const; 
parameter: x Pixel position in horizontal direction
parameter: y Pixel position in vertical direction
parameter: value Pixel color (returned value)
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_GetPixelColorBOOL getPixelColor(unsigned x, unsigned y, RGBQUAD *value) const; 
parameter: x Pixel position in horizontal direction
parameter: y Pixel position in vertical direction
parameter: value Pixel index
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_SetPixelIndexBOOL setPixelIndex(unsigned x, unsigned y, BYTE *value); 
parameter: x Pixel position in horizontal direction
parameter: y Pixel position in vertical direction
parameter: value Pixel color
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_SetPixelColorBOOL setPixelColor(unsigned x, unsigned y, RGBQUAD *value); //@} //@{ 
parameter: image_type New image type
parameter: scale_linear TRUE if image pixels must be scaled linearly when converting to a standard bitmap
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertToType, FreeImage_ConvertToStandardTypeBOOL convertToType(FREE_IMAGE_TYPE image_type, BOOL scale_linear = TRUE); 
parameter: T Threshold value in [0..255]
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ThresholdBOOL threshold(BYTE T); 
parameter: algorithm Dithering algorithm to use.
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_Dither, FREE_IMAGE_DITHERBOOL dither(FREE_IMAGE_DITHER algorithm); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertTo4BitsBOOL convertTo4Bits(); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertTo8BitsBOOL convertTo8Bits(); 
see: FreeImage_ConvertToGreyscale
returns: Returns TRUE if successfull, FALSE otherwise.BOOL convertToGrayscale(); 
parameter: algorithm Color quantization algorithm to use.
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ColorQuantize, FREE_IMAGE_QUANTIZEBOOL colorQuantize(FREE_IMAGE_QUANTIZE algorithm); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertTo16Bits555BOOL convertTo16Bits555(); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertTo16Bits565BOOL convertTo16Bits565(); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertTo24BitsBOOL convertTo24Bits(); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertTo32BitsBOOL convertTo32Bits(); 
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ConvertToRGBFBOOL convertToRGBF(); 
parameter: tmo Tone mapping operator
parameter: first_param First tone mapping algorithm parameter (algorithm dependant)
parameter: second_param Second tone mapping algorithm parameter (algorithm dependant)
returns: Returns TRUE if successfull, FALSE otherwise.
see: FreeImage_ToneMappingBOOL toneMapping(FREE_IMAGE_TMO tmo, double first_param = 0, double second_param = 0); //@} //@{ 
see: FreeImage_IsTransparentBOOL isTransparent() const; 
returns: Returns the number of transparent colors in a palletised bitmap.
see: FreeImage_GetTransparencyCountunsigned getTransparencyCount() const; 
returns: Returns a pointer to the bitmap’s transparency table.
see: FreeImage_GetTransparencyTableBYTE* getTransparencyTable() const; 
see: FreeImage_SetTransparencyTablevoid setTransparencyTable(BYTE *table, int count); 
see: FreeImage_HasBackgroundColorBOOL hasFileBkColor() const; 
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_GetBackgroundColorBOOL getFileBkColor(RGBQUAD *bkcolor) const; 
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_SetBackgroundColorBOOL setFileBkColor(RGBQUAD *bkcolor); //@} //@{ 
parameter: image Output image to be extracted
parameter: channel Color channel to extract
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_GetChannel, FREE_IMAGE_COLOR_CHANNELBOOL getChannel(fipImage& image, FREE_IMAGE_COLOR_CHANNEL channel) const; 
parameter: image Input 8-bit image to insert
parameter: channel Color channel to replace
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_SetChannel, FREE_IMAGE_COLOR_CHANNELBOOL setChannel(fipImage& image, FREE_IMAGE_COLOR_CHANNEL channel); 
parameter: RedChannel Output red channel.
parameter: GreenChannel Output green channel.
parameter: BlueChannel Output blue channel.
returns: Returns FALSE if the dib isn't a valid image, if it's not a 24-bit image or if one of the output channel can't be allocated. Returns TRUE otherwise.
see: FreeImage_GetChannelBOOL splitChannels(fipImage& RedChannel, fipImage& GreenChannel, fipImage& BlueChannel); 
parameter: red Input red channel.
parameter: green Input green channel.
parameter: blue Input blue channel.
returns: Returns FALSE if the dib can't be allocated, if the input channels are not 8-bit images. Returns TRUE otherwise.
see: FreeImage_SetChannelBOOL combineChannels(fipImage& red, fipImage& green, fipImage& blue); //@} //@{ 
parameter: angle Image rotation angle, in degree
parameter: x_shift Image horizontal shift
parameter: y_shift Image vertical shift
parameter: x_origin Origin of the x-axis
parameter: y_origin Origin of the y-axis
parameter: use_mask Whether or not to mask the image. Image mirroring is applied when use_mask is set to FALSE
returns: Returns the translated & rotated dib if successful, returns NULL otherwise
see: FreeImage_RotateExBOOL rotateEx(double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask); 
parameter: angle Image rotation angle, in degree
returns: Returns rotated dib if successful, returns NULL otherwise
see: FreeImage_RotateClassicBOOL rotate(double angle); 
see: FreeImage_FlipHorizontalBOOL flipHorizontal(); 
see: FreeImage_FlipVerticalBOOL flipVertical(); //@} //@{ 
returns: Returns TRUE if successful, FALSE otherwise.
see: FreeImage_InvertBOOL invert(); The transformation is done as follows.<br> Image 8-bit : if the image has a color palette, the LUT is applied to this palette, otherwise, it is applied to the grey values.<br> Image 24-bit & 32-bit : if channel == IPL_CC_RGB, the same LUT is applied to each color plane (R,G, and B). Otherwise, the LUT is applied to the specified channel only. 
parameter: LUT Lookup table. The size of 'LUT' is assumed to be 256.
parameter: channel The color channel to be processed (only used with 24 & 32-bit DIB).
returns: Returns TRUE if the operation was successful, FALSE otherwise
see: FreeImage_AdjustCurve, FREE_IMAGE_COLOR_CHANNEL */ BOOL adjustCurve(BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
parameter: gamma Gamma value to use. A value of 1.0 leaves the image alone, less than one darkens it, and greater than one lightens it.
returns: Returns TRUE if the operation was successful, FALSE otherwise
see: FreeImage_AdjustGamma, adjustCurveBOOL adjustGamma(double gamma); 
parameter: percentage Where -100 <= percentage <= 100
A value 0 means no change, less than 0 will make the image darker and greater than 0 will make the image brighter.
returns: Returns TRUE if the operation was succesful, FALSE otherwise
see: FreeImage_AdjustBrightness, adjustCurveBOOL adjustBrightness(double percentage); 
parameter: percentage Where -100 <= percentage <= 100
A value 0 means no change, less than 0 will decrease the contrast and greater than 0 will increase the contrast of the image.
returns: Returns TRUE if the operation was succesfull, FALSE otherwise
see: FreeImage_AdjustContrast, adjustCurveBOOL adjustContrast(double percentage); 
parameter: histo pointer to an histogram array. Size of this array is assumed to be 256.
parameter: channel Color channel to use
returns: Returns TRUE if the operation was succesfull, FALSE otherwise
see: FreeImage_GetHistogramBOOL getHistogram(DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel = FICC_BLACK) const; //@} //@{ 
parameter: new_width New image width
parameter: new_height New image height
parameter: filter The filter parameter specifies which resampling filter should be used.
returns: Returns TRUE if the operation was successful, FALSE otherwise
see: FreeImage_Rescale, FREE_IMAGE_FILTER */ BOOL rescale(WORD new_width, WORD new_height, FREE_IMAGE_FILTER filter);
parameter: max_size Maximum width or height in pixel units
parameter: convert When set to TRUE, converts the image to a standard type
returns: Returns TRUE if the operation was successful, FALSE otherwise
see: FreeImage_MakeThumbnail */ BOOL makeThumbnail(WORD max_size, BOOL convert = TRUE); //@}//@{ 
parameter: bStatus TRUE if the image should be marked as modified, FALSE otherwise
see: isModifiedvoid setModified(BOOL bStatus = TRUE) { _bHasChanged = bStatus; } 
returns: Returns TRUE if the image is marked as modified, FALSE otherwise
see: setModifiedBOOL isModified() { return _bHasChanged; } //@} //@{ 
parameter: model Metadata model to look forunsigned getMetadataCount(FREE_IMAGE_MDMODEL model) const; 
parameter: model Metadata model to look for
parameter: key Metadata field name
parameter: tag Returned tag
returns: Returns TRUE if the operation was succesfull, FALSE otherwise
see: FreeImage_GetMetadataBOOL getMetadata(FREE_IMAGE_MDMODEL model, const char *key, fipTag& tag) const; 
parameter: model Metadata model used to store the tag
parameter: key Tag field name
parameter: tag Tag to be attached
returns: Returns TRUE if the operation was succesfull, FALSE otherwise
see: FreeImage_SetMetadataBOOL setMetadata(FREE_IMAGE_MDMODEL model, const char *key, fipTag& tag); //@} protected: //@{ BOOL replace(FIBITMAP *new_dib); //@} }; // ---------------------------------------------------------- fipWinImage provides methods used to : <ul> <li>Display a DIB on the screen <li>Copy / Paste a DIB to/from Windows devices (HANDLE, HBITMAP, Clipboard) <li>Capture a window (HWND) and convert it to an image </ul> 
version: FreeImage 3
author: Hervé Drolon */ ifdef _WIN32 class FIP_API fipWinImage : public fipImage { public://@{ Constructor fipWinImage(FREE_IMAGE_TYPE image_type = FIT_BITMAP, WORD width = 0, WORD height = 0, WORD bpp = 0); Destructor ~fipWinImage(); Destroy image data virtual void clear(); Returns TRUE if the image is allocated, FALSE otherwise BOOL isValid() const; //@} //@{ 
see: FreeImage_ClonefipWinImage& operator=(const fipImage& src); 
see: FreeImage_ClonefipWinImage& operator=(const fipWinImage& src); HANDLE copyToHandle() const; 
returns: Returns TRUE if successful, returns FALSE otherwiseBOOL copyFromHandle(HANDLE hMem); 
returns: Returns TRUE if successful, returns FALSE otherwiseBOOL copyFromBitmap(HBITMAP hbmp); //@} //@{ 
parameter: hWndNewOwner Handle to the window to be associated with the open clipboard. In MFC, you can use AfxGetApp()->m_pMainWnd->GetSafeHwnd().
returns: Returns TRUE if successful, returns FALSE otherwiseBOOL copyToClipboard(HWND hWndNewOwner) const; 
returns: Returns TRUE if successful, returns FALSE otherwiseBOOL pasteFromClipboard(); //@} //@{ 
parameter: hWndApplicationWindow Handle to the application main window
parameter: hWndSelectedWindow Handle to the window to be captured
returns: Returns TRUE if successful, returns FALSE otherwiseBOOL captureWindow(HWND hWndApplicationWindow, HWND hWndSelectedWindow); //@} //@{ When the image is transparent or has a file background, this function composite the foreground image against a checkerboard background image. 
parameter: hDC Handle to the device context
parameter: rcDest Destination rectangle
see: FreeImage_Composite */ void draw(HDC hDC, RECT& rcDest) const { drawEx(hDC, rcDest, FALSE, NULL, NULL); }When the image is transparent or has a file background, this function can composite the foreground image against a checkerboard background image, against a single background color or against a user background image.<br> When the image is a High Dynamic Range image (48-bit or RGB float), this function will apply a tone mapping operator before drawing the image.<br> The original image (located in the fipImage class) will not be affected by any of the operations that could be done in order to display it. 
parameter: hDC Handle to the device context
parameter: rcDest Destination rectangle
parameter: useFileBkg When set to TRUE, the function uses the file color background if there is one
parameter: appBkColor When a color is given, the function uses it as the background color
parameter: bg When a FIBITMAP is given, the function uses it as the background image
see: FreeImage_Composite
see: setToneMappingOperator */ void drawEx(HDC hDC, RECT& rcDest, BOOL useFileBkg = FALSE, RGBQUAD *appBkColor = NULL, FIBITMAP *bg = NULL) const;
parameter: tmo Tone mapping operator
parameter: first_param First tone mapping algorithm parameter
parameter: second_param Second tone mapping algorithm parameter
see: FreeImage_ToneMappingvoid setToneMappingOperator(FREE_IMAGE_TMO tmo, double first_param = 0, double second_param = 0); 
parameter: tmo Tone mapping operator
parameter: first_param First tone mapping algorithm parameter
parameter: second_param Second tone mapping algorithm parameter
see: FreeImage_ToneMappingvoid getToneMappingOperator(FREE_IMAGE_TMO *tmo, double *first_param, double *second_param) const; //@} protected: DIB used for display (this allow to display non-standard bitmaps) mutable FIBITMAP *_display_dib; remember to delete _display_dib mutable BOOL _bDeleteMe; tone mapping operator FREE_IMAGE_TMO _tmo; first tone mapping algorithm parameter double _tmo_param_1; second tone mapping algorithm parameter double _tmo_param_2; }; endif // _WIN32 // ---------------------------------------------------------- 
version: FreeImage 3
author: Hervé Drolonclass FIP_API fipMemoryIO : public fipObject { protected: Pointer to a memory stream FIMEMORY *_hmem; public : 
parameter: data Pointer to the memory buffer
parameter: size_in_bytes Buffer size in bytes
see: FreeImage_OpenMemoryfipMemoryIO(BYTE *data = NULL, DWORD size_in_bytes = 0); 
see: FreeImage_CloseMemory~fipMemoryIO(); BOOL isValid() const; 
see: FreeImage_GetFileTypeFromMemoryFREE_IMAGE_FORMAT getFileType() const; operator FIMEMORY*() { return _hmem; } //@{ 
parameter: fif Format identifier (FreeImage format)
parameter: flags The signification of this flag depends on the image to be loaded.
returns: Returns the loaded dib if successful, returns NULL otherwise
see: FreeImage_LoadFromMemoryFIBITMAP* load(FREE_IMAGE_FORMAT fif, int flags = 0) const; 
parameter: fif Format identifier (FreeImage format)
parameter: dib Image to be saved
parameter: flags The signification of this flag depends on the image to be saved.
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SaveToMemoryBOOL save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, int flags = 0); 
parameter: buffer Storage location for data
parameter: size Item size in bytes
parameter: count Maximum number of items to be read
returns: Returns the number of full items actually read, which may be less than count if an error occurs
see: FreeImage_ReadMemoryunsigned read(void *buffer, unsigned size, unsigned count) const; 
parameter: buffer Pointer to data to be written
parameter: size Item size in bytes
parameter: count Maximum number of items to be written
returns: Returns the number of full items actually written, which may be less than count if an error occurs
see: FreeImage_WriteMemoryunsigned write(const void *buffer, unsigned size, unsigned count); 
see: FreeImage_TellMemorylong tell() const; 
see: FreeImage_SeekMemoryBOOL seek(long offset, int origin); 
parameter: data Pointer to the memory buffer (returned value)
parameter: size_in_bytes Buffer size in bytes (returned value)
see: FreeImage_AcquireMemoryBOOL acquire(BYTE **data, DWORD *size_in_bytes); //@} private: Disable copy fipMemoryIO(const fipMemoryIO& src); Disable copy fipMemoryIO& operator=(const fipMemoryIO& src); }; // ---------------------------------------------------------- fipMultiPage encapsulates the multi-page API. It supports reading/writing multi-page TIFF, ICO and GIF files. */ class FIP_API fipMultiPage : public fipObject { protected: Pointer to a multi-page file stream FIMULTIBITMAP *_mpage; TRUE when using a memory cache, FALSE otherwise BOOL _bMemoryCache; public: 
parameter: keep_cache_in_memory When it is TRUE, all gathered bitmap data in the page manipulation process is kept in memory, otherwise it is lazily flushed to a temporary file on the hard disk in 64 Kb blocks.fipMultiPage(BOOL keep_cache_in_memory = FALSE); ~fipMultiPage(); Returns TRUE if the multi-page stream is opened BOOL isValid() const; 
parameter: lpszPathName Name of the multi-page bitmap file
parameter: create_new When TRUE, it means that a new bitmap will be created rather than an existing one being opened
parameter: read_only When TRUE the bitmap is opened read-only
parameter: flags Load flags. The signification of this flag depends on the image to be loaded.
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_OpenMultiBitmapBOOL open(const char* lpszPathName, BOOL create_new, BOOL read_only, int flags = 0); 
parameter: memIO Memory stream. The memory stream MUST BE a wrapped user buffer.
parameter: flags Load flags. The signification of this flag depends on the image to be loaded.
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_LoadMultiBitmapFromMemoryBOOL open(fipMemoryIO& memIO, int flags = 0); 
parameter: flags Save flags. The signification of this flag depends on the image to be saved.
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_CloseMultiBitmapBOOL close(int flags = 0); 
see: FreeImage_GetPageCountint getPageCount() const; 
parameter: image Image to append
see: FreeImage_AppendPagevoid appendPage(fipImage& image); 
parameter: page Page number. Page has to be a number smaller than the current number of pages available in the bitmap.
parameter: image Image to insert
see: FreeImage_InsertPagevoid insertPage(int page, fipImage& image); 
parameter: page Page number
see: FreeImage_DeletePagevoid deletePage(int page); 
parameter: target Target page position
parameter: source Source page position
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_MovePageBOOL movePage(int target, int source); 
parameter: page Page number
returns: Returns the page if successful, returns NULL otherwise
see: FreeImage_LockPageFIBITMAP* lockPage(int page); 
parameter: image Page to unlock
parameter: changed When TRUE, the page is marked changed and the new page data is applied in the multi-page bitmap.
see: FreeImage_UnlockPagevoid unlockPage(fipImage& image, BOOL changed); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_GetLockedPageNumbersBOOL getLockedPageNumbers(int *pages, int *count) const; }; // ---------------------------------------------------------- FreeImage uses this structure to store metadata information. */ class FIP_API fipTag : public fipObject { protected: Pointer to a FreeImage tag FITAG *_tag; public: //@{ 
see: FreeImage_CreateTagfipTag(); 
see: FreeImage_DeleteTag~fipTag(); //@} //@{ 
see: FreeImage_CloneTagfipTag(const fipTag& tag); 
see: FreeImage_CloneTagfipTag& operator=(const fipTag& tag); 
see: operator FITAG*()fipTag& operator=(FITAG *tag); //@} 
see: operator=(FITAG *tag)operator FITAG*() { return _tag; } Returns TRUE if the tag is allocated, FALSE otherwise BOOL isValid() const; //@{ 
see: FreeImage_GetTagKeyconst char *getKey() const; 
see: FreeImage_GetTagDescriptionconst char *getDescription() const; 
see: FreeImage_GetTagIDWORD getID() const; 
see: FreeImage_GetTagTypeFREE_IMAGE_MDTYPE getType() const; 
see: FreeImage_GetTagCountDWORD getCount() const; 
see: FreeImage_GetTagLengthDWORD getLength() const; 
see: FreeImage_GetTagValueconst void *getValue() const; 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagKeyBOOL setKey(const char *key); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagDescriptionBOOL setDescription(const char *description); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagIDBOOL setID(WORD id); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagTypeBOOL setType(FREE_IMAGE_MDTYPE type); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagCountBOOL setCount(DWORD count); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagLengthBOOL setLength(DWORD length); 
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_SetTagValueBOOL setValue(const void *value); //@} 
parameter: model Metadata model specification (metadata model from which the tag was extracted)
parameter: Make Camera model (not used yet)const char* toString(FREE_IMAGE_MDMODEL model, char *Make = NULL) const; }; <b>Usage : </b><br> <pre> fipImage image; // ... fipTag tag; fipMetadataFind finder; if( finder.findFirstMetadata(FIMD_EXIF_MAIN, image, tag) ) { do { // process the tag cout << tag.getKey() << "\n"; } while( finder.findNextMetadata(tag) ); } // the class can be called again with another metadata model if( finder.findFirstMetadata(FIMD_EXIF_EXIF, image, tag) ) { do { // process the tag cout << tag.getKey() << "\n"; } while( finder.findNextMetadata(tag) ); } </pre> */ class FIP_API fipMetadataFind : public fipObject { protected: Pointer to a search handle FIMETADATA *_mdhandle; public: Returns TRUE if the search handle is allocated, FALSE otherwise BOOL isValid() const; Constructor fipMetadataFind(); 
see: FreeImage_FindCloseMetadata~fipMetadataFind(); 
parameter: model Metadata model
parameter: image Input image
parameter: tag Returned tag
returns: Returns TRUE if successful, returns FALSE otherwise
see: FreeImage_FindFirstMetadataBOOL findFirstMetadata(FREE_IMAGE_MDMODEL model, fipImage& image, fipTag& tag); 
parameter: tag Returned tag
returns: Returns TRUE if successful, returns FALSE otherwise, indicating that no more matching tags could be found
see: FreeImage_FindNextMetadataBOOL findNextMetadata(fipTag& tag); }; endif // FREEIMAGEPLUS_H 
[]readme course(s) prefaceI 1 2II 3 4III 5 6 7IV 8 9 10V 11 12 afterthought(s)appendix reference(s) example(s)resource(s) _
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.