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

Re: NSImage very strange


  • Subject: Re: NSImage very strange
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Wed, 22 Dec 2004 17:28:55 +0100

At 15:30 Uhr +0000 22.12.2004, Benjohn wrote:
We've noticed that for _some_ JPEG images (but no tiff images as far as we know):

* a very low resolution version of the image is being used so that it is interpolated up for display.
* the tiles are being drawn the right way up, but are being taken from the wrong (y inverted) part of the image.

The low resolution is possibly due to the JPEG containing resolution information that indicates it's higher than 72 dpi (the Mac's resolution on-screen). You can easily test whether this is the case by opening your image in Preview.app. If it comes up very small and you have to zoom in to see much more, it contains resolution information.


To make your NSImage ignore the resolution, you have to "scale up" the image's size using setSize: to set its width to the NSBitmapImageRep's pixelsWide and pixelsHigh values (this has been discussed on this list in recent month a couple of times).

I don't know about the inverted part, though. The only thing I could think of is that you're thinking you could feed flipped coordinates into the NSImage as the source rect, which you can't. The image itself isn't flipped, and the source rect is IIRC in image coordinates.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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 very strange (From: Benjohn <email@hidden>)

  • Prev by Date: Re: Renaming files?
  • Next by Date: Re: Renaming files?
  • Previous by thread: Re: NSImage very strange
  • Next by thread: Creating black and white image
  • Index(es):
    • Date
    • Thread