On 10 Nov 2010, at 14:00, Amy Gibbs wrote:

> Hi all,
> 
> that fixes my null  issue, thanks, I can't believe I didn't see that.
> 
> I still can't work out how to get the original height and width of my image 
> though, I'm trawling through google searches for nsimage and size etc but 
> nothing seems to work I get various error messages,
> 
> while ((imgPath = [imageLoop nextObject])) {
>                       NSImage *img = [[NSImage 
> alloc]initWithContentsOfFile:imgPath];
>                       float imgsize = [img bounds].size.height;
>                               
>                       float scalefactor = 225 /imgsize ;
>                       
> 
NSImage doesn't respond to -bounds (NSImageView does). You should have got a 
warning about this.
Try NSImage -size

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________

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 arch...@mail-archive.com

Reply via email to