• 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
NSImage from Web: Resolution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage from Web: Resolution


  • Subject: NSImage from Web: Resolution
  • From: Matt Judy <email@hidden>
  • Date: Sat, 15 Dec 2001 21:51:36 -0800

Hi,

I know that a solution for this was posted a while back, but I can't seem to find it...

I'm using NSImages obtained from the WWW by using NSImage's initWithData and NSURL's resourceDataUsingCache:. I then display that image in an NSImageView. Works well.

The problem is, if the resolution of the downloaded image is higher than 72 dpi (e.g. 300 dpi), the image is rendered at that resolution, appearing much smaller on the screen than it should. Seems like a bug (image should match resolution of display device), but anyway...

I believe the workaround was to get the pixel height and width of the image and then set its size, or something like that. Anyone have the solution?

--Matt


  • Follow-Ups:
    • Re: NSImage from Web: Resolution
      • From: Marcel Weiher <email@hidden>
    • Re: NSImage from Web: Resolution
      • From: Matt Judy <email@hidden>
  • Prev by Date: registering -persistentDomainForName
  • Next by Date: Scaling an NSMovie proportionally
  • Previous by thread: Re: Problems with Apache
  • Next by thread: Re: NSImage from Web: Resolution
  • Index(es):
    • Date
    • Thread