iDevGames Forums
Why such large images in mobile safari? - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Why such large images in mobile safari? (/thread-9654.html)



Why such large images in mobile safari? - the311guy - Dec 27, 2011 05:39 PM

http://bit.ly/ti5vrH

Why is this image showing larger than the iPhone4 screen in mobile safari? The width of the image is 640px, the iphone screen is 640px.

Any ideas? Huh


RE: Why such large images in mobile safari? - BeyondCloister - Dec 27, 2011 06:40 PM

The iPhone 4 screen is a retina display. This means that effectively the screen is 320px wide because it displays 2 pixels in the same space as 1 pixel on a non-retina display. So in an app you would display a 640px wide image in a 320px width on an iPhone 4 compared to a 320px wide image in a 320px width on an iPhone 3 or an iPad.

Safari must be displaying the source image as a non retina image and thus taking up double the width you are expecting.


RE: Why such large images in mobile safari? - the311guy - Dec 29, 2011 06:26 PM

Ah... thank you!