Save image with caption in iOS? - ios

I want to save an image to my iPhone gallery by adding some caption to it.I Now whenever i want to search that caption in my photo app it should return that images which i saved with same caption.So is it possible to save images to gallery in such way & retrieve all the images.
Thanks

Related

Picking images from camera and album in iOS Swift 5

I'm working in the application where users will select multiple images from album or taking pictures from camera and send it to server via REST API. Size limit is 5MB for all images. Is there any way to determine the size of images while selecting it from UIImagePicker before loading into application?. Also suggest me the better approach do the same
You can’t do it using built in UIImagePickerController. You can write your own asset picker.

Storing UIImage for later use

I am making what can be described as an image manipulation app. My idea is that the user imports UIImages through the pod YPImagePicker and they are stored in two arrays, one for thumbnails and one for the fullsized images. A UICollectionView is then populated with the thumbnails and when the user taps the thumbnail the fullsized image is displayed in a UIImageView.
I am having memory issues with this solution. The RAM hits 300 MB on an iPhone X when I have roughly 10-12 images imported, which I have understood is too much. I guess it is because I store all the fullsized images in an array? Should I store the fullsized images on the users hard drive and not in RAM-memory? Or is there any way I can access the images from the users photo library and fetch the image when the user taps the thumbnail?

How to show byte array of image in gallery as image in xamarin.ios?

I am downloading an image from api. This api provides me the bytes of image. Now I want to show this image in gallery (like normal images that is available in gallery). Means when user click the button in app, it should download the image's byte array and the image should open in full screen in gallery.
Like this
If you want to save this to system gallery. You can try to convert your byte array to UIImage, then save this image:
NSData data = NSData.FromStream(new MemoryStream(imageBytes));
// Or NSData data = NSData.FromArray(imageBytes);
UIImage img = UIImage.LoadFromData(data);
img.SaveToPhotosAlbum((image, error) =>
{
});
On iOS 11, if you want to add images to photo library, do not forget to add the NSPhotoLibraryAddUsageDescription key in info.plist:
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Our application needs permission to write photos...</string>

Image version on Carrierwave

I'm making an album section and after the user uploads the images, carrierwave is making some versions like :thumb and :full.
When showing all the albums I get the first image of the album and display as the album cover. The thing is, I'm having to resize the thumb image and it gets ugly, I'd like to know if I can make a version (:cover) only of the first image uploaded so I can call this version when showing albums, but only the first image, so I don't have to make this version for all the images since I'll just be using the first one.

How to save cropped image of an image URL without saving the original image? (in Rails using Paperclip or other plug-ins)

Hi all
I have an app now showing photos from URL, not from my own database (file system).
For example, a photo from Facebook:
http://sphotos.ak.fbcdn.net/hphotos-ak-snc1/hs085.snc1/5041_98423808305_40796308305_1960517_6704612_n.jpg
I've added the crop function to get the cropping area (x,y,w,h) of the photo.
And now I'd like to save the cropped image from the URL (i.e. without downloading the original image to my database before cropping)
Is it even possible?
Or is there anyway to get the image into memory to process without saving it to database?
I've searched some questions here, but they all talk about how to save the crop of images which have been uploaded to the database by users.
Thank you very much in advance.
How do you imagine cropping works without access to the original image? The process would be like this:
Download the remote image to a /tmp as a temporary file (Tip: TempFile)
Crop the crap out of it
Save the cropped image with Paperclip to your DB
Remove the temporary file

Resources