• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage and NSImageView issues (not drawing correctly)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSImage and NSImageView issues (not drawing correctly) (From: Nick Rogers <email@hidden>)

  • Prev by Date: NSImage and NSImageView issues (not drawing correctly)
  • Next by Date: Re: Resource Fork - is this a good use/the right thing to do?
  • Previous by thread: NSImage and NSImageView issues (not drawing correctly)
  • Next by thread: awakeFromInsert rules: ok to fetch and create other managed objects?
  • Index(es):
    • Date
    • Thread