* src/nsimage.m ([EmacsImage allocInitFromFile:]): Use isValid to
check whether the image is valid instead of generating a tiff.
image = [[EmacsImage alloc] initByReferencingFile:filename];
image->bmRep = nil;
-#ifdef NS_IMPL_COCOA
- imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
-#else
- imgRep = [image bestRepresentationForDevice: nil];
-#endif
- if (imgRep == nil)
+ if (![image isValid])
{
[image release];
return nil;
}
+ imgRep = [[image representations] firstObject];
[image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
[image setName:filename];