NSImage,NSImageView, display and address faults
NSImage,NSImageView, display and address faults
- Subject: NSImage,NSImageView, display and address faults
- From: Dan Grassi <email@hidden>
- Date: Wed, 3 Dec 2003 16:48:33 -0500
When I get address faults with .tiff and .jpeg images that are faulty.
The usual fault is that the file has been truncated. Somewhere in the
display code an address violation occurs so my program dies. Is there
a way to handle this?
Ex:
image = [[NSImage alloc] initWithContentsOfFile:fileName];
if ((image != 0) && [image isValid])
{
[imageView setImage: image];
[image release];
[imageView setNeedsDisplay:YES];
}
Note, Apple's Preview application also crashes on these images so it is
not just my code.
Dan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.