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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to