FROM : stephane sudre
DATE : Mon Apr 25 19:21:06 2005
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.
DATE : Mon Apr 25 19:21:06 2005
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.
| Related mails | Author | Date |
|---|---|---|
| Graham | Apr 25, 19:13 | |
| stephane sudre | Apr 25, 19:21 | |
| Nicko van Someren | Apr 25, 19:38 |






Cocoa mail archive

