X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fjpeg%2Fjpegloader.cpp;h=9b7150d40eb4cb590710e3e881e535f7ed822d4a;hb=b74b0945b2e19c32f05d8bcb016cc9434c99979d;hp=39866c18aaabaee7351f6fb2f419e8e3d4ab47ed;hpb=2ce0c7fc1c33de76b816144df2978518ec6738f6;p=libs%2Fgui.git diff --git a/source/graphics/jpeg/jpegloader.cpp b/source/graphics/jpeg/jpegloader.cpp index 39866c1..9b7150d 100644 --- a/source/graphics/jpeg/jpegloader.cpp +++ b/source/graphics/jpeg/jpegloader.cpp @@ -113,10 +113,10 @@ JpegLoader::~JpegLoader() bool JpegLoader::detect(const string &sig) { - static const char jpeg_sig[] = "\xFF\xD8\xFF"; + static const char jpeg_sig[] = { '\xFF', '\xD8', '\xFF' }; if(sig.size()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); }