Re: NSImage and NSImageView issues (not drawing correctly)
Re: NSImage and NSImageView issues (not drawing correctly)
- Subject: Re: NSImage and NSImageView issues (not drawing correctly)
- From: Michael Vannorsdel <email@hidden>
- Date: Wed, 23 Apr 2008 10:37:41 -0600
You might need to specify a size for some formats for your
imageToBeDrawn object.
On Apr 23, 2008, at 10:27 AM, Nick Rogers wrote:
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).
_______________________________________________
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