void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data) { if (!bitmap || !data) return; if (page >= FreeImage_GetPageCount(bitmap)) return; MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); BlockReference *block = FreeImage_SavePageToBlock(header, data); if(block==NULL) return; // add a block if (page > 0) { BlockListIterator block_source = FreeImage_FindBlock(bitmap, page); header->m_blocks.insert(block_source, (BlockTypeS *)block); } else { header->m_blocks.push_front((BlockTypeS *)block); } header->changed = TRUE; header->page_count = -1; }
void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data) { if (!bitmap || !data) return; MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); BlockReference *block = FreeImage_SavePageToBlock(header, data); if(block==NULL) return; // add the block header->m_blocks.push_back((BlockTypeS *)block); header->changed = TRUE; header->page_count = -1; }
void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data) { if (!bitmap || !data) { return; } MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); if(const PageBlock block = FreeImage_SavePageToBlock(header, data)) { // add the block header->m_blocks.push_back(block); header->changed = TRUE; header->page_count = -1; } }
void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data) { if (!bitmap || !data) { return; } if (page >= FreeImage_GetPageCount(bitmap)) { return; } MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); if(const PageBlock block = FreeImage_SavePageToBlock(header, data)) { // add a block if (page > 0) { BlockListIterator block_source = FreeImage_FindBlock(bitmap, page); header->m_blocks.insert(block_source, block); } else { header->m_blocks.push_front(block); } header->changed = TRUE; header->page_count = -1; } }