* We need to clean up the JPEG object, close the input file, and return.
*/
if (verbose)
+ {
wxLogError(_("JPEG: Couldn't load - file is probably corrupted."));
+ }
(cinfo.src->term_source)(&cinfo);
jpeg_destroy_decompress(&cinfo);
if (image->Ok()) image->Destroy();
* We need to clean up the JPEG object, close the input file, and return.
*/
if (verbose)
+ {
wxLogError(_("JPEG: Couldn't save image."));
+ }
jpeg_destroy_compress(&cinfo);
return false;
}
{
unsigned char hdr[2];
- if ( !stream.Read(hdr, WXSIZEOF(hdr)) )
+ if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) // it's ok to modify the stream position here
return false;
return hdr[0] == 0xFF && hdr[1] == 0xD8;