Re: NSImage with multiple representation sizes
Re: NSImage with multiple representation sizes
- Subject: Re: NSImage with multiple representation sizes
- From: Benjamin Rister <email@hidden>
- Date: Tue, 8 Sep 2009 14:42:15 -0400
So to be clear: if I create a TIFF image, with tiffutil -cat, that
has 9x9px@72dpi, 16x16px@72dpi, 32x32px@72dpi:
- This is an entirely supported configuration, despite what man
tiffutil says and the warning it generates.
No, these reps would not have the same -size. If you set the DPI
metadata for the reps to 72, 128, and 256 respectively, then each
rep would have -size 9x9.
This is what I meant above. It's fine to have different pixel
sizes, but it's best to set the metadata so that the -size is
consistent.
Okay, take 2 then. If I do the same thing, with 9x9px@72dpi,
16x16px@128dpi, and 32x32px@256dpi (so the tiffutil warning isn't
applicable anymore), will NSImage correctly use the more detailed
image when drawing into a 16x16pt space? As I mentioned, Cocoa
Drawing Guide > Images > How an Image Representation Is Chosen gives
rules to be applied in the order of color space, dpi, bit depth. All
have the same color space, the 9x9px@72dpi matches dpi (when at 1.0
scale factor) and the others don't, so according to the docs it's the
one that would be chosen, with poor results.
Best,
Benjamin Rister
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden