Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#187 PluginJBIG - error load from jbig file

open
nobody
None
5
2014-08-26
2011-09-30
Sergey
No

PluginJBIG.cpp

static FIBITMAP * DLL_CALLCONV
Load(FreeImageIO io, fi_handle handle, int page, int flags, void data) {
try {
..............................................................................................................................
for (int i = 0; i < jbg_dec_getheight(&s); ++i) {
memcpy(FreeImage_GetScanLine(dib, jbg_dec_getheight(&s) - i - 1), bits, FreeImage_GetPitch(dib));

                bits += FreeImage_GetPitch(dib);

In this unit it is necessary to replace function invocation "FreeImage_GetPitch(dib)" with function "FreeImage_GetLine(dib)" since the size of a line of the image isn't always multiple 32.

Discussion