Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/FreeImage/PluginCUT.cpp view on Meta::CPAN
io->read_proc(&count, 1, sizeof(BYTE), handle);
continue;
}
if (count & 0x80) {
count &= ~(0x80);
if(io->read_proc(&run, 1, sizeof(BYTE), handle) != 1) {
throw FI_MSG_ERROR_PARSING;
}
if(k + count <= header.width) {
memset(bits + k, run, count);
} else {
throw FI_MSG_ERROR_PARSING;
}
} else {
if(k + count <= header.width) {
if(io->read_proc(&bits[k], count, sizeof(BYTE), handle) != 1) {
throw FI_MSG_ERROR_PARSING;
}
} else {
throw FI_MSG_ERROR_PARSING;
}
}
k += count;
i += count;
}
return dib;
} catch(const char* text) {
if(dib) {
FreeImage_Unload(dib);
}
FreeImage_OutputMessageProc(s_format_id, text);
return NULL;
}
}
// ==========================================================
// Init
// ==========================================================
void DLL_CALLCONV
InitCUT(Plugin *plugin, int format_id) {
s_format_id = format_id;
plugin->format_proc = Format;
plugin->description_proc = Description;
plugin->extension_proc = Extension;
plugin->regexpr_proc = RegExpr;
plugin->open_proc = NULL;
plugin->close_proc = NULL;
plugin->pagecount_proc = NULL;
plugin->pagecapability_proc = NULL;
plugin->load_proc = Load;
plugin->save_proc = NULL;
plugin->validate_proc = Validate;
plugin->mime_proc = MimeType;
plugin->supports_export_bpp_proc = SupportsExportDepth;
plugin->supports_export_type_proc = SupportsExportType;
plugin->supports_icc_profiles_proc = NULL;
plugin->supports_no_pixels_proc = SupportsNoPixels;
}
( run in 1.389 second using v1.01-cache-2.11-cpan-d7f47b0818f )