本文整理汇总了C++中StringTable::Done方法的典型用法代码示例。如果您正苦于以下问题:C++ StringTable::Done方法的具体用法?C++ StringTable::Done怎么用?C++ StringTable::Done使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringTable
的用法示例。
在下文中一共展示了StringTable::Done方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
//LZW Minimum Code Size
io->read_proc(&b, 1, 1, handle);
StringTable stringtable;
stringtable.Initialize(b);
//Image Data Sub-blocks
int x = 0, xpos = 0, y = 0, shift = 8 - bpp, mask = (1 << bpp) - 1, interlacepass = 0;
BYTE *scanline = FreeImage_GetScanLine(dib, height - 1);
BYTE buf[1024];
io->read_proc(&b, 1, 1, handle);
while( b ) {
io->read_proc(stringtable.FillInputBuffer(b), b, 1, handle);
int size = sizeof(buf);
while( stringtable.Decompress(buf, &size) ) {
for( int i = 0; i < size; i++ ) {
scanline[xpos] |= (buf[i] & mask) << shift;
if( shift > 0 ) {
shift -= bpp;
} else {
xpos++;
shift = 8 - bpp;
}
if( ++x >= width ) {
if( interlaced ) {
y += g_GifInterlaceIncrement[interlacepass];
if( y >= height && interlacepass < GIF_INTERLACE_PASSES ) {
y = g_GifInterlaceOffset[++interlacepass];
}
} else {
y++;
}
if( y >= height ) {
stringtable.Done();
break;
}
x = xpos = 0;
shift = 8 - bpp;
scanline = FreeImage_GetScanLine(dib, height - y - 1);
}
}
size = sizeof(buf);
}
io->read_proc(&b, 1, 1, handle);
}
if( page == 0 ) {
size_t idx;
//Logical Screen Descriptor
io->seek_proc(handle, 6, SEEK_SET);
WORD logicalwidth, logicalheight;
io->read_proc(&logicalwidth, 2, 1, handle);
io->read_proc(&logicalheight, 2, 1, handle);
#ifdef FREEIMAGE_BIGENDIAN
SwapShort(&logicalwidth);
SwapShort(&logicalheight);
#endif
FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", ANIMTAG_LOGICALWIDTH, FIDT_SHORT, 1, 2, &logicalwidth);
FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", ANIMTAG_LOGICALHEIGHT, FIDT_SHORT, 1, 2, &logicalheight);
//Global Color Table
if( info->global_color_table_offset != 0 ) {
RGBQUAD globalpalette[256];
io->seek_proc(handle, info->global_color_table_offset, SEEK_SET);
int i = 0;