I know I should have two versions of my image, one standarad and one #2x but my app downloads a vast amount of content which i need to optimise. Im looking at using just retina images in my downloaded content and then seeing if there is an objective c way to take a graphic half it and make it none retina. using a retina image on my non retina ipad looks blurry.
For images. You have to download separate images with your desired dimensions. For example Facebook timeline has separate image for user icon (e.g. 25x25). and For ever post having photo, a thumbnail is generated say it has dimensions (310x160). And then when a user clicks the image to view. It opens the original Image. Whatever dimensions it has. So, In your case. you have to download two images. One for your non retina and one for retina. You can use Flicker API's for that.
Note: You can skip this and continue with retina display because Non retina devices are rarely being used now. So, every one has retina device and app will work perfect with your existing scenario.
Related
I have built responsive website which works great on all devices except iOS.
On iOS devices, my background images get blurry.
Here is link to my website. http://www.idynxschool.com/vesco/
You can view it on iPhone and you will find blurry images. Is this something to do retina ready images?
Any solution will be really appreciated.
Thanks
In Safari on iOS, there is a known limitation when displaying large PNG and GIF images. The issue is triggered by the overall number of pixels in the image, so even if an image is narrow, you can experience blurriness if the image is tall enough.
This affects both the iPad and iPhone and affects all models of device. However, the exact image size that triggers the issue varies from iPhone to iPad and between models. For example, if you’re creating an image for iPhone 6 Plus that is 1080px wide, then the image can be up to ~4800px tall before blurriness would occur.
If you use JPG instead of PNG or GIF, then you may see less blurriness since the limit is increased for JPG images. For PNG or GIF images, however, the only way to work around this issue at current is to reduce the dimensions of the image until they’re below the limit that causes the issue.
Answer found: https://support.invisionapp.com/hc/en-us/articles/204660949-Why-are-my-images-in-iOS-blurry-
I want to add a full screen image into an iOS app and I want to know the best way to support different devices
The problem with using the image assets: 1x, 2x, and 3x is that 2x is used for iPhone4s, iPhone5, and iPhone6 which every one of them has a different dimensions
Should I use a different images (one for every device) and include them as resources then at runtime I choose the image based on the current device? I feel like it is not a good solution
any suggestions of a more elegant way?
If you click on the asset you can configure more options and sizes depending on various parameters. Conceptually similar to what happens when you create a new LaunchScreen Item in the asset. See image.
Depending on what is the wanted end results you can also adopt different tactiques, like having a background image that is big enough to be set as "Center" aspect mode and the eventually place other images like logos or titles on top of it. Or again just have one big image that can be set as "AspectFit".
It's not a good idea to have a different image for every device. Either use stretching or tiling to handle different sizes, or make an image that you can clip on smaller screen sizes, or you will have to have different images for each device and code to detect which to use and spend time maintaining that whenever new devices are announced.
I have a question that I need confirmation on. I know that the Apple Developer document shows App icon size at #3x
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html.
Does this also apply to regular images that you use in your App? I just need to make 100 percent sure. The other stackoverflow answers I encountered just show App icon sizes, but doesn't address regular images that you use through out your App.
If you want your app to take full advantage of the Retina HD display then yes, you need to have all versions for all images used by your app, i.e. image.png, image#2x.png, image#3x.png.
Dont forget to setup launch screens for each iPhone size, or your bigger phones will just enlarge your app views without really using AutoLayout or using the high def images.
It doesn't apply for regular images that you use in you app. Make sure they are with good pixels.
Provide high-resolution (#2x) versions of all image assets.
Images that are not #2x will appear blurry on the Retina display.
source:
https://developer.apple.com/design/tips/
I'm releasing a new update for one of my apps and I was disappointed to see that it just barely surpasses 20MB estimated size (20MB is the point where it can no longer be downloaded over cell data).
My app contains a lot of images, so I could greatly reduce the size if I didn't have all those non-retina images. I know that there are some non-retina devices that will be running my app. So here are my questions:
How will a non-retina device react if I have an image with the #2x suffix but no non-retina image without it.
If I use a retina sized image without the #2x suffix and scale it down to the size I want to display it at programmatically and/or
through interface builder, will it still maintain full quality on
retina devices? Will the quality be worse on a non-retina device
than using an image I downscaled from the original using GIMP
instead?
How will a non-retina device react if I have an image with the #2x suffix but no non-retina i
image without it.
I use that approach on a couple of apps of mine and it works flawlessly. I am not able to detect any performance or visual issues on non-retina display devices (concretely, iPad 1/2 and mini).
I am not sure what can happen on older iOS version, since I only support iOS5+ on those apps.
If I use a retina sized image without the #2x suffix and scale it down to the size I want to display it at programmatically and/or through interface builder, will it still maintain full quality on retina devices? Will the quality be worse on a non-retina device than using an image I downscaled from the original using GIMP instead?
This comes down to how you set interpolation options while doing the scaling. See this other question for more details on how interpolation quality affects scaling down an image. In GIMP or Photoshop you also have control on the interpolation to be used for scaling, btw.
But in the end I don't think you need to go this way.
Most importantly, that bandwidth limit has been raised to 50MB.
OK.
If you only provide one image then you have one of two possibilities.
The image is a non-retina image. This will look fine on the non-retina. It will look identical on a retina device. But will look low quality next to a retina image.
The image is a retina image. On the retina device it will still load as a retina image. It will look fine. However, on the non-retina device it will have to scale down the image. This takes extra cycles of the CPU so could affect performance and it may not look how you want. It may shrink the image using a different method than you want and so may make the image look odd.
This is the same with or without a suffix.
The best solution is to create retina images and then use your editor of choice to create the standard versions. Nothing will stop you only providing one image but it may lead to a look and performance that you don't want.
On a side note. The size for downloading over cellular data was increased to 50MB.
Try these things using the simulator and find out for yourself.
I think the answer is that UIImage will ignore the #2x choice if you're relying on [UIImage imageNamed:#"without2xSuffix.png"] and not find anything, but I haven't tried it. Deliberately requesting the #2x file will work, but whether the image will be scaled, tiled, stretched or centered (or something else) is up to the place where it's used.
Note that the documentation says that unless you use the name without the #2x suffix and let iOS find the 2x version for you, it will set the scale of the image to 1.0 rather than 2.0, which complicates drawing. You'd have to load the image using imageWithData:scale: to fix this.
I am creating an application for iPad, the images I have available from graphic designer are
really big, almost twice the size.
According to the graphic designer, the images were created keeping in mind iPad 3.
So if I reduce my image size to half and use them, is it going to make any difference on iPad3?
Or there is no difference and it will be compatible in both.
I am new to iOS development and not sure about the image resizing in detail.
Thanks in advance.
You will have two versions of every image where one is double the size of the other and the operating system will decide which version to use. You just need to name the images correctly.
Images for ipad3 will have #2x within the name. Example
image.png <--- non retina ipad
image#2x.png <------ retina ipad (ipad3)
Here is a post explaining this more: Preparing your iPhone App for Higher Resolutions