Will images look different from the iPhone Simulator to an actual iDevice? - iphone

Images that I add to the layer in Cocos2d look pixelated around the edges of the image (i.e. a hillside, the rounded part of the hill, where the sky and the hill meet). I don't know if it's the image quality, or just because the graphics processor on my 'older' MacBook Pro is not as advanced as the iPhone 4 or iPod Touch 4 or iPad 2. Is it because of that?

I have ran into an instance where a large resolution image was being used in the context of a locally packaged HTML file in a UIWebView. The image looked fine in the simulator, but when ran on a hardware device, a bug was exposed in the rendering engine where it would invert the colors. Here's a bug report as an example of this. The solution was to scale the image down a bit in photo editing application.
While an extreme corner case, this is an example of the simulator not quite living up to how things will work on a hardware device.

The simulator usually does a pretty good job representing what the final image will look like. For the image quality on a normal computer to be worse than that of an iPhone for it to make a large enough difference, your MacBook Pro has to be really bad. So I doubt it.
However, if you really want to make sure, the best way to check would be to transfer the image you are using to another machine to see if it still looks pixelated. If it does, its a problem with your image.
Hope this helps and good luck!

Related

Cocos2d iphone app runs oddly on actual iphone

I have a simple application using Cocos2d, and all the images show up fine when running on the simulator. However, when i run it on an iphone, all the images are scaled up and incredible amount, making the game unplayable.
Has anyone got any ideas as to why this is happening, and how to fix it?
You need to consider the possibility that your simulator is running retina. Probably you are trying to display an image that is at the higher resolution on an older, non-retina device.
You can also just add the suffix "-hd" to any image, and then cocos2d will recognize it as being at the higher resolution automatically. But when you actually finish your app you will want to have 2 copies of each image, one at each resolution.
I found out that the problem was that when i initialised the sprite, using spriteWithFile, it set it to a certain size. When i changed the sprites texture later on, it kept the size of the last image, but had a different texture.

iOS 5 - animated gifs showing in wrong colors sometimes

I'm using some animated gifs on our mobile-site. It's a clock-animation and since the iOS 5 update it sometimes happens that the clock gets blue instead of red, as planned. Happens on iPhone4 and iPhone5 with the new os.
Any ideas what could cause the problems? It's hard to reconstruct this failure but it happens from time to time.
Any help would be appreciated.
Sometimes ios devices may not be able to process all the images because of its relatively low graphics ability compared to that of a computer. Instead of using a GIF I would suggest using an animated PNG. This has been more popular among the ios devices as using GIFs has become obsolete when working with ios devices. I am not sure how fast this would be, but I would say it can apply less stress then that of a gif. Another idea, because it is a clock gif is to analyze the gif in a program and determine any problems. Also use imgoptim (for mac) or pngcrush for windows to reduce the size of the gif to reduce the stress on the processor.
use GIF 128 Dither and Please make sure that images size has to be base on the resolution it happen some time if your images size is not depend on retina or normal resolutions. And if I am not wrong you facing problem only in retina device, may be below details will help
iPhone Retina Display
~~~~~~~~~~~~~~~~~~~~~~~
Width - 640px
Height - 960px : including 40px status bar
DPI - 326
You can use Cocos2D framework, Cocos2d and UIKIT both work great with out any graphic related errors... Sprite sheets reduces the memory usage and also support all transparant images , you can run animation ,stop and repeat them. Good luck..

PNG quality looks horrible on iPhone

I've created some avatars from vector artwork and saved them as transparent PNGs. If I place the PNGs in interface builder, the quality is perfect. When I place them using code, the edges are horribly jagged, as if the AA has been removed, yet it's the same image. Is there any way to place them with code and maintain nice smooth edges?
I've attached a screenshot below with the iphone ver on the right.
Thanks,
Chris
Apple compresses pngs using a special optimization formula. It is possible that this formula is causing your images to alter from the original. If you notice a difference that you cannot live with, turn off the optimization by going into your target's info panel and unchecking the Compress PNG files option under the build tab.
I have the same experience with this kind of situation.
Also when I change the hardware to iphone 4 it seems to be really good. so my suggestion to u is that unless u transfer ur app to iphone dont relay on the simulator.
You cannot really tell what will be the result on iphone by referring to simulator.
so dont panic, just check the image on iphone first before you get to any conclusion.

Easy ways to crop out the status bar when taking iOS Screenshots?

Apple recommends cropping out the status bar from screenshots submitted to the app store. Doing this manually in Preview is a very tedious and error-prone process.
Do any developers have any best-practices recommendations or automated techniques for speeding up this process? The goal would be to take as input iPad and/or iPhone screenshots, and output them with the toolbar cropped off. We need to support both portrait and landscape orientation, and Retina-resolution iPhone screens.
I've found a few utilities online that purport to help with this, but the ones I have found seem to fail on Retina-display resolution screens. And another that works via the iOS Simulator requires a 1920x1080 resolution monitor to process iPad screenshots - making it useless for non-17" laptop-based developers.
Any other recommendations for taking good screenshots for the AppStore? I know (based on my searching) that there are a lot of other developers who would be interested in a quicker workflow to handle this.
Bonus points for being able to bulk-process an entire directory.
I developed a free App, Status Barred which is on the Mac App Store. It crops your iOS screenshots from iPhone, iPad, portrait, landscape, normal & retina display.
I used the ImageMagick command line tools to batch crop all the Screenshot png files, but haven't figured out how to not use auto assigned output filenames.
convert Screenshot*.png -crop 640x920+0+40 920Screenshot.png
Here are two ways, assuming you mean status bar and not toolbar (which you probably shouldn't crop out of the screenshots).
If you have photoshop, just change the canvas size by subtracting 20 (low-res) or 40 (retina) and anchoring the bottom of the image. This works perfectly.
It's also easy in iPhoto using the Edit/Crop feature. Set the dimensions to the correct size (Portrait: 320x460 or 640x920 and Landscape: 480x300 or 960x600) and move the crop screen to the bottom of the image. This does it perfectly as well.
After much searching, the easiest tool I have found is the iOS Simulator Cropper. It does a great job of handling different resolutions and orientations, and it is painless to use. No need to muck around with Photoshop or other slow / cumbersome tools.
Link: http://www.curioustimes.de/iphonesimulatorcropper/index.html
The developer reports that they have enhanced the iOS Simulator Cropper to bulk process screenshots taken on device as well as via the Simulator. I haven't tried this yet since the update, but if it works well this will be the perfect solution.
I have also found a very useful tool in the Mac App store called "Status Barred" that also very simply crops the status bar out of any images handed to it.
How about just using Preview? Command+A to select all, drag the selection down to 920px then Tools => Crop.

iphone 4 higher resolution pics vs 3gs

i just have a 3gs for testing (here in romania i still cant get a iphone 4)
When I just create full screen images for iPhone 4 .. would they be displayed resized on the 3gs?
I just cant make a bundle version for 3gs and 4 with 2 times my images, they are already a lot. Do I have to make now 2 Apps ??
Could this be a trick: In my xib i define a 320x480 UIImageView (it will be resized automaticly on the iPhone4) when I there define "scale to fill" and make high resolution images, would they come more sharp on the iPhone 4?
Now I am just wondering how to work best right now for big animations.
thx
Just found out in my case its fine to use higher resolution pics into a 320x480 frame like for 3GS and make Aspect FILL.
When I test on a iPhone 4 Simulator it shows much higher resolution and same on iPad if I click 2x :)
you can also create alternative high resolution images with a name ending in "#2x". so if you have an image called "arrow.png", create one with twice the resolution called "arrow#2x.png" and the iphone 4 will use that.
check out this article: http://thomasmaier.me/2010/06/dealing-with-iphone-4-resolution-2x-inside-of-photoshop/
Try it and find out, but my suspicion is that even if they do work, they won't work on OS 3.0 or OS 3.1, and plenty of people have not upgraded yet.
Also note that even if it displays them at half-size, I'm pretty sure that they'll still be "#2x" images. This means they'll use more memory and generally perform worse.
What's wrong with adding a handful of new images? The normal-size images are a lot smaller than the #2x images.
EDIT: If you have a lot of images, you may find it beneficial to use JPEGs where appropriate (e.g. for photos or photo-like backgrounds). I'm not sure, but I think they should work with +[UIImage imageNamed:] though you might have to specify ".jpg" explicitly.