• 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 Size Discrepancies
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSImage Size Discrepancies (From: Dan Saul <email@hidden>)
 >Re: NSImage Size Discrepancies (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: Mac OS X Programming
  • Next by Date: Re: AuthorizationRef, AuthorizationCopyRights, with less user interaction
  • Previous by thread: Re: NSImage Size Discrepancies
  • Next by thread: Re: NSImage Size Discrepancies
  • Index(es):
    • Date
    • Thread