discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage and PNG


From: Andreas Höschler
Subject: Re: NSImage and PNG
Date: Sun, 30 May 2004 00:30:22 +0200

Hi,

Not sure if it's the same problem, but Riccardo Mottola had a similar
problem on (I think) solaris. It turned out that gcc was miscompiling
NSBitmapImageRep.m or NSBitmapImageRep+JPEG.m and caused the jpeg check
to return true for all images (and the load would later fail since the
tiff was not a jpeg).

I have checked that by adding a log statement in NSBitmapImageRep+JPEG.m. The JPG test returns NO for my TIFF.

I was too quick. This indeed is the problem. In NSBitmapImageRep+JPEG.m

+ (BOOL) _bitmapIsJPEG: (NSData *)imageData
{
...
  jpeg_read_header(&cinfo, TRUE);
...
}

This line somehow makes the method return YES for my TIFF. So how do we fix this now? This problem seems to only occur on Solaris, otherwise others would already have complained.

Regards,

  Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]