Re: Imported .png images doesn't maintain its original size
Re: Imported .png images doesn't maintain its original size
- Subject: Re: Imported .png images doesn't maintain its original size
- From: Ken Thomases <email@hidden>
- Date: Sat, 21 Feb 2009 08:38:42 -0600
On Feb 21, 2009, at 8:18 AM, Gustavo Pizano wrote:
Well, Im importing a .png image created in photoshop, with a
specific size, when I import it into xcode the size it's really
really small, not the one that the images has, I have tried to
create a new png file in PS and copy there the image form the old
one, and it worked, but when when I tried once again, with another
image, it kept having this strange behavior.
any ideas what can be happening?
I'm not entirely sure what context you're referring to (do you mean
the Xcode image viewer, or do you mean in your application?), but the
problem is almost certainly a confusion about what exactly an image's
size is.
An image has a size in pixels, but it also has a size in "real-world
units" like inches, centimeters, etc. The latter is usually expressed
by combining its size in pixels with its dots-per-inch (DPI).
Cocoa and Preview and the like try to display an image in its actual
real-world units size. That is, they try to show a 1"x1" image so
that it actually appears to be 1"x1" on your screen, even if the image
has a much higher resolution than your screen. So, that 1" might have
300 pixels in the image, but it would be down-sampled for display on
your 96 DPI screen.
You might interpret that as showing you the image as smaller than it
"really" is because you're expecting to see the image take up 300
pixels x 300 pixels on your screen.
So, so sum up: make sure Photoshop is using the proper DPI for the
image so that its real-world size is what you intend.
Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden