X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fjpeg%2Fjpegloader.cpp;h=f61f651d5db13104c6ec6e54c397d5d10929d3fc;hb=2ebdf45974a0a7649b3488f9da4b8cf90a1db584;hp=bc0f2df60ef50c6967dcde7e56f43d8f4fafce61;hpb=2effe9b416302914a8b8d88c815e20bd874d8100;p=libs%2Fgui.git diff --git a/source/graphics/jpeg/jpegloader.cpp b/source/graphics/jpeg/jpegloader.cpp index bc0f2df..f61f651 100644 --- a/source/graphics/jpeg/jpegloader.cpp +++ b/source/graphics/jpeg/jpegloader.cpp @@ -119,7 +119,7 @@ bool JpegLoader::detect(const string &sig) return !sig.compare(0, sizeof(jpeg_sig), jpeg_sig, sizeof(jpeg_sig)); } -void JpegLoader::load(Image::Data &data) +void JpegLoader::load_(Image::Data &data) { if(setjmp(priv->err_mgr.jmp)) throw bad_image_data(priv->err_mgr.message); @@ -133,14 +133,14 @@ void JpegLoader::load(Image::Data &data) data.stride = priv->jpeg.output_width*priv->jpeg.output_components; data.fmt = RGB; - data.data = new char[data.stride*data.height]; + data.pixels = new char[data.stride*data.height]; JSAMPROW rows[8]; while(priv->jpeg.output_scanlinejpeg.output_scanline; unsigned count = min(y, 8U); for(unsigned i=0; i(data.data+(y-i-1)*data.stride); + rows[i] = reinterpret_cast(data.pixels+(y-i-1)*data.stride); jpeg_read_scanlines(&priv->jpeg, rows, count); }