NSImage and NSImageView issues (not drawing correctly)
NSImage and NSImageView issues (not drawing correctly)
- Subject: NSImage and NSImageView issues (not drawing correctly)
- From: Nick Rogers <email@hidden>
- Date: Wed, 23 Apr 2008 21:57:29 +0530
Hi,
1. I'm using:
NSImage *image = [[NSImage alloc] initWithData:data];
NSImageRep *imageRep = [image bestRepresentationForDevice:nil];
NSImage *imageToBeDrawn = [[NSImage alloc] init];
[imageToBeDrawn addRepresentation:imageRep];
if ([imageToBeDrawn isValid] == YES)
[previewImage setImage:imageToBeDrawn];
else
[previewImage setImage:nil];
[data release];
// where previewImage is of (NSImageView *) type.
But certain images (even the small size like 100KB) are not
completely drawn, and the display shows garbled image.
certain PNG image shows only a black rectangle. only some small
images are drawn in good quality.
2. Can I show text in NSImageView. Certain same category software are
showing text in the same place as their NSIMageView. So I was
wondering, how thats possible. (I have checked their nib files, and
the text show at the same place as thier NSImageView).
Any help would be greatly appreciated.
Wishes,
Nick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden