Re: image arithmetic
Re: image arithmetic
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 (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