I'm developing an app in which i have to save images in iPhone photo library. When i'm saving image in iPhoto library in app programmatically i want the image to be saved with high resolution with retina display. How can i achieve this?
Its upto your requirement how you are saving the images in the application. If you are resizing the images while saving them then you can try to save a better version as well so it may work in both resolutions. However, the question is very vague. Please do give some more explanation.
Related
When saving a photo in Corona SDK. Regardless of the method used it seems no to be possible to capture any offscreen contents. For instance a 500x500 image displayed on a 320x480 device would be cropped at 320x480 when saved with display.save()
Is there a workaround for this? Is it possible to.
Save offscreen content?
Save or use an image directly from the device photo library?
Thanks for your help.
I don't think there is a way to capture offscreen content using Corona. Maybe there is a workaround to your whole problem if you give us more details.
Have you looked at the media.show function. With this you can load images from the photo library or the camera. It has option to either show the image directly on the screen or just save it to the sandbox.
We have this #2x stuff on iOS that loads images for retina devices, but what about videos?
Suppose I want to show a video on normal iPad and retina iPad. Do I have to have two videos, one normal and one #2x or just the bigger video?
I suppose the bigger video is enough, but I want to know what you guys think.
thanks.
iOS doesn't do it automatically like UIImage does. But you can check the screen resolution yourself and then decide which video you will play.
But I would recommend you to just use a video which resolution is high enough to play well at #2x resolution since the resolution will be downsized anyway if it is too large.
During image upload on iOS we experience a memory spike at the end of the upload and we get memory warnings during upload of a picture taken by the camera (experienced on iPhone 5 and simulator). Additionaly, the upload takes pretty long. For our app we don't really need the full quality photo of the user.
Is there a way to resize the image before upload (like there is a setting for upload quality of a video)?
Client side resizing is not currently supported. I'll add it to our tracker.
(It's worth noting that if you ask for an image/jpeg instead of an image/png, the size of the photo is significantly smaller)
I've seen other questions asking about the maximum image size that can be loading into a view, but I'm asking how big an image can the iphone compose and save to photo gallery? I've tried a couple of pic frame apps and the biggest I've made on an iphone 4 is 2400x2400.
Starting from iOS 4.0 you can use ALAssetsLibrary class to write images to standard iOS image library. According documentation there are no words about any limitations to image size. Probably it depends on RAM memory usage which is required to handle as large image as possible. This post can be useful as well iOS memory allocation - how much memory can be used in an application?
I have a few questions about screen resolution, that I'm not clear on. These questions assume they my app will be running on iOS 4.0 and up, and on either iPhone 3GS or iPhone 4.
Should the size of the splash image (default.png) be (960x640) or (480x320)?
Should the size of the app icon (Icon.png) be (57x57) or (114x114)?
What about other graphics that I may use in my app, such a graphic that represents a button? Should I always create these images for the higher resolution, and have the app scale them down? In other words, if I want a button image to be displayed on the 3GS that is 200x40 - should I create the image at 400x80, so that iPhone 4 can take advantage of it?
Thanks!
A good guide to this can be found here: http://mobile.tutsplus.com/tutorials/iphone/preparing-your-iphone-app-for-higher-resolutions/
In general you just create 2 sets of images. Your original and then a new one twice as big with #2x in the name. So for image.png at size 32x32 you would have one that is twice the resolution called image#2x.png at size 64x64. In your app just always use the image.png in Interface Builder and when loading in code.
There is no need to detect the device. These images will automatically be picked up by the OS and subbed in as necessary.
Provide both sizes (960x640 & 480x320) for the splash image using the #2x method described above
Provide both icons (57x57 & 114x114) using the #2x method
For our apps we use a combination of the #2x images and just Scaling the large images. (More information on this can be found in the above article) We use the #2x images for bar buttons, icons, etc. But for UIImageViews we often just use the Scaling. There can be a performance hit for doing this, but for most apps I'd say this is negligible. The savings in file size sometimes make scaling the only option.
Related Questions:
Retina/non-retina images in UIImageView
Making an app Retina Display friendly
You need to provide both if you want them to look nice. For example,
Default.png -> (480x320)
Amd
Default#2x.png -> (960x640)