Get image Properties in iPhone to check image quality - ios

I'm capturing an image from the iPhone camera and storing it in the document folder for further check and use.
Before storing the image i want to check the image quality based on the RGB value, grayscale and white balance , etc.
All that i can get from the image. But i am not able to understand what should or how should i use any framework that would help me retrieve this information.
Any help would be appreciated.
Thank you!

This app may do what you want. It is called Photo Metadata Reader. I saw it had RGB in the screenshots.
https://itunes.apple.com/us/app/photo-metadata-reader/id437865801?mt=8

If you want to retrieve metadata from UIImage - check this
https://github.com/foundry/UIImageMetadata
If you want to get, for example, color balance, I think you must get pixel data from image and compute this by yourself

Related

DNG image resolution iOS?

I'm trying to figure out a way to read DNG image resolution without actually loading the image using CIFilter. So far I tried:
CGImageSourceCopyMetadataAtIndex - doesn't have any resolution info at all in returned dictionary
CGImageSourceCopyPropertiesAtIndex - has only resolution of the embedded preview image
What do I miss? I'm sure there are apps that read that info somehow or do they use 3d party libs like libexif?
Never mind. CIFilter does not process the image unless it's rendered. But the image properties are available immediately through CIImage

xamarin iOS alasset fullresolution image with filter

I am working on a Xamarin IOS application, testing on a iPhone5 version 8.1.3, where I let the user select images with the ALAssetLibrary. These images get send to a server and get processed. There is a minimum size to these images so I need the complete image.
I have a bit of a problem with getting the full resolution images.
First I check the size of the images with asset.DefaultRepresentation.Dimensions. After that I get the image with asset.DefaultRepresentation.GetImage(). Now here i have three different cases.
a image with no filter
a image made with a filter
a image made without a filter, and a filter later applied to it
In all three cases the dimensions give me a value like h:3500 w: 2800. Which is exactly what I need. When i get the images in the first and third case it gives me a image with the same size. But in the second case it gives me a image with something like h:910 w: 640; Which is the same size as asset.DefaultRepresentation.GetFullScreenImage() would give me.
Is there any way to get a full size image when the image is made with a filter?
EDIT
Also when I make a photo with a filter and then remove the filter from the image I get a image with h:3500 w:2800. This means that the original image must be present. I just need to know how to get it.

iOS - Save UIImage as a greyscale JPEG

In my app, I convert and process images.
from colour to greyscale, then doing operations such as histogram-equalisation, filtering, etc.
that part works fine.
my UIImage display correctly, I also save them to jpeg files and it works.
The only problem is that, although my images are now greyscales, they are still saved as RGB jpegs. that is the red, green and blue value for each pixel are the same but it still waste space to keep the duplicated value, making the file size higher than it could be.
So when i open the image file in photoshop, it is black & white but when I check "Photoshop > Image > Mode", it still says "RGB" instead of "Greyscale".
Anyone know how to tell iOS that the UIImageJPEGRepresentation call should create data with one channel per pixel instead of 4?
Thanks in advance.
You should do an explicit conversion of your image using CGColorSpaceCreateDeviceGray() as color space which is 8 bits per component, 1 channel.

Save RGBA image with metadata in iOS

I am working on an iOS application that does some image processing.
The result of the processing is a grey-scale image.
When the process is finished, I want to save the original RGB image together with the result in a same image file to camera roll, so I thought of using alpha channel for that.
Also, I want to attach some parameters got in the processing as image metadata.
So here it comes my problem. I could not find an iOS compatible image format that allows saving alpha channel together with metadata.
On the one hand, JPEG images accept metadata, but not alpha channel.
On the other hand, PNG images accept alpha channel, but not metadata.
Any ideas?
Thanks in advance.
On the other hand, PNG images accept alpha channel, but not metadata.
But yes metadata.

Store an image in disk

I have a 1x1 inch passport photo and I want to store it in a computer disk in a way I minimize the size but also been able to print it back to the real world.
What do you recommend me? Thanks in advance.
UPDATE: this question is about image resolution.
If you have a database, consider storing the image in a BLOB column, that will allow you to relate it with other information.

Resources