Re: NSImage Size Discrepancies
Re: NSImage Size Discrepancies
- Subject: Re: NSImage Size Discrepancies
- From: Dan Saul <email@hidden>
- Date: Sun, 13 Mar 2005 11:08:58 -0600
Thanks alot, that was it :).
On Sun, 13 Mar 2005 12:25:50 +0100, Stéphane Sudre <email@hidden> wrote:
>
> On dimanche, mars 13, 2005, at 07:52 AM, Dan Saul wrote:
>
> > Hello there, I have an NSImage I create at run time of an image
> > (http://catsdorule.torpedobird.com/img/blogpix/husky.jpg) all my code
> > works except for one small problem. The Size of the NSImage is
> > different then the actual image, running NSLog(@"%f",[backgroundImage
> > size].width); shows that the width is 245.759995 when infact it is
> > 1024.
> >
> > Is there any way to fix this or to get the actual size so I can set it
> > manually?
>
> The size and the number of pixels is not the same thing.
>
> You may need to get one image representation and use the pixelsHigh and
> pixelsWide methods:
>
> - (NSSize)size
>
> Returns the size of the image in units of the base coordinate system.
> This size is the size of the image when it's rendered; it's not
> necessarily the same as the width and height of the image in pixels as
> specified in the image data.
>
> See Also: - pixelsHigh, - pixelsWide
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden