#include <FreeImagePlus.h>
Inheritance diagram for fipMultiPage:
fipMultiPage encapsulates the multi-page API. It supports reading/writing multi-page TIFF, ICO and GIF files.
Public Member Functions | |
fipMultiPage (BOOL keep_cache_in_memory=FALSE) | |
Constructor. | |
~fipMultiPage () | |
Destructor Close the file stream if not already done. | |
BOOL | isValid () const |
Returns TRUE if the multi-page stream is opened. | |
BOOL | open (const char *lpszPathName, BOOL create_new, BOOL read_only, int flags=0) |
Open a file stream. | |
BOOL | close (int flags=0) |
Close a file stream. | |
int | getPageCount () const |
Returns the number of pages currently available in the multi-paged bitmap. | |
void | appendPage (fipImage &image) |
Appends a new page to the end of the bitmap. | |
void | insertPage (int page, fipImage &image) |
Inserts a new page before the given position in the bitmap. | |
void | deletePage (int page) |
Deletes the page on the given position. | |
BOOL | movePage (int target, int source) |
Moves the source page to the position of the target page. | |
FIBITMAP * | lockPage (int page) |
Locks a page in memory for editing. | |
void | unlockPage (fipImage &image, BOOL changed) |
Unlocks a previously locked page and gives it back to the multi-page engine. | |
BOOL | getLockedPageNumbers (int *pages, int *count) const |
Returns an array of page-numbers that are currently locked in memory. | |
Protected Attributes | |
FIMULTIBITMAP * | _mpage |
Pointer to a multi-page file stream. | |
BOOL | _bMemoryCache |
TRUE when using a memory cache, FALSE otherwise. |
|
Constructor.
|
|
Destructor Close the file stream if not already done.
|
|
Appends a new page to the end of the bitmap.
|
|
Close a file stream.
|
|
Deletes the page on the given position.
|
|
Returns an array of page-numbers that are currently locked in memory. When the pages parameter is NULL, the size of the array is returned in the count variable. You can then allocate the array of the desired size and call getLockedPageNumbers again to populate the array.
|
|
Returns the number of pages currently available in the multi-paged bitmap.
|
|
Inserts a new page before the given position in the bitmap.
|
|
Returns TRUE if the multi-page stream is opened.
Implements fipObject. |
|
Locks a page in memory for editing.
You must call unlockPage to free the page fipMultiPage mpage; // ... fipImage image; // You must declare this before image = mpage.lockPage(2); if(image.isValid()) { // ... mpage.unlockPage(image, TRUE); }
|
|
Moves the source page to the position of the target page.
|
|
Open a file stream.
|
|
Unlocks a previously locked page and gives it back to the multi-page engine.
|
|
TRUE when using a memory cache, FALSE otherwise.
|
|
Pointer to a multi-page file stream.
|