• 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 from a url
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage from a url


  • Subject: Re: NSImage from a url
  • From: stephane sudre <email@hidden>
  • Date: Mon, 25 Apr 2005 19:21:06 +0200


On Apr 25, 2005, at 7:13 PM, Graham wrote:

Hi,

I creating NSImage instances from urls.
Mostly there is no problem, but for some images, the resulting NSImage size is smaller than the image at the url location. This is easily verified by entering the url in a browser and looking at the image.
This image: http://photos7.flickr.com/10756720_fe91e8456a.jpg is 500 pixels wide when you view it in the browser, but when I create an NSImage from it, the NSImage is only 180 pixels wide. Using the exact same code most images come out the correct size, such as this one: http://photos7.flickr.com/10424399_6f73976e6e.jpg which is 500 wide and creates an NSImage 500 wide.
I am using the Java API's by the way.


Any ideas?

Yes, check the picture resolution.

The photos7.flickr.com/10756720_fe91e8456a.jpg is 500 pixels wide but is not 72dpi.

Get a NSImageRep of the NSImage and use pixelsHigh and pixelsWide to get the value you're looking for.

_______________________________________________
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 from a url (From: Graham <email@hidden>)

  • Prev by Date: NSImage from a url
  • Next by Date: Re: How do you call a method of a super view?
  • Previous by thread: NSImage from a url
  • Next by thread: Re: NSImage from a url
  • Index(es):
    • Date
    • Thread