background image on iPhone
jonmulcahy
Member, Sous Chef Posts: 10,408
I've got a really long background image: 320 x 2900. When I play in Safari, it looks nice and crisp. When I play on the iPhone, it's blurry. I saw somewhere that you can't have an image bigger than 1024, should I split this image up into 3 separate ones and just lay them next to each other?
Comments
So if it's at X 400 & Y 300 then make it 400.5 & 300.5
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I've inadvertently created blurry images in Photoshop, when I "Save As" a .png. They look fine in Photoshop, in Preview, etc., but are blurry in GS.
However, when I "Save For Web & Devices" instead, all is well.
Haven't had to do the 0.5px offset. BTW, my experience is with using GS for web deployment, not the iPhone, yet.
http://gamesalad.com/wiki/game_elements#how_big_can_i_make_my_image
http://kuon.goyman.com/2009/01/22/iphone-large-image-viewer/
For one of my iPhone project, I had to view large images of about 2500×2500 pixels, which is tricky because UIImage and UIView doesn’t support size above 1024×1024.
http://bindapple.com/iphone-comics/
Each page is roughly three times the size of the maximum image that the iPhone can easily display (1024×1024 pixels). If the large images are used on the iPhone, they must be broken into smaller pieces and shown to the user as they scroll throughthe page. This takes up a lot of processor time. Processor=battery so the battery life suffers.”
What size can textures be?
Textures must have power of two dimensions less than or equal to 1024 e.g 2,4,8,16,32,64,128,256,512 and 1024.
So 16×256 is okay, 512×512 is okay but 240×320 is not.
Additionally if you want to use compressed (PVRTC) textures they must be square.
http://www.cocos2d-iphone.org/wiki/doku.php/faq
You can still use an image that does not follow these rules but beware that it will be stored in a texture with power of two dimensions. So loading a 240×320 images will result in a 256×512 texture being created.
On newer platforms (such as iPhone 3GS) a maximum texture size of 2048×2048 is supported, however, the Texture2D class that performs texture loading has a hard coded maximum of 1024.
http://discussions.apple.com/thread.jspa?messageID=7712958
There is one imagepicker call to get an album picture, one to get a camera picture and one for camera roll. All supply a UIImage even using the uncropped version as you're doing.
UIImage is limited to 1024. (Check the ref document)
All of these routines pass back smaller images than what went in.
Currently there is no way around this within the SDK that I am aware of.
I've tried resaving them as higher quality PNGs, I've confirmed that the images are at native size and not stretched.
Last thing I need to try is splitting the images so it isn't one huge image.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I'm using Photoshop, does that incorrectly save 72dpi as 72.1dpi like Preview does?
Strange thing is, my 320x480 background images work fine, and those should be the same as the 320x2900 ones, DPI and everything.
I'm doing all this work over a VPN connection back home, so it's not the easiest thing to do, I think during lunch I'm going to attempt to split the image into 3 sections and see how that goes.
Anyone have any other suggestions to try?
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Yes, I downloaded it this morning so I could work on my laptop, but I think I fixed it. Splitting up the image into three 72DPI 1000px segments worked. I'm not sure why it didn't like my original image, it must have just been too big.
Thanks for all the help everyone
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left