calculate illuminance from Exif Data
How I calculate the lux or illuminance by iPhone Camera.I have calculated all the exif data which is as: key = FocalLength, value = 3.85 key = MeteringMode, value = 5 key = ShutterSpeedValue, value = 4.591759434012097 key = ExposureProgram, value = 2 key = FocalLenIn35mmFilm, value = 32 key = SceneType, value = 1 […]
Taking an RGB color and normalizing it with UIColor on the iPhone
I’m looking for a straight forward way to convert a color from RGB, grabbing it from a tool like Photoshop, then convert it to a UIColor. Since UIColor uses normalized gamut of 0.0 to 1.0 for each color space, I’m not sure how this is done. Thanks for the solution.
Need help with YUV display in OpenGl
I am having trouble displaying a raw YUV file that it is in NV12 format. I can display a selected frame, however, it is still mainly in black and white with certain shades of pink and green. Here is how my output looks like alt text http://img.ioscake.com/objective-c/hv0vih.png Anyways, here is how my program works. (This […]
Objective-C RGB to HSB
Let’s say I’ve got the colour FF0000, which is red. Finding a darker colour is easy, I just type maybe CC instead of the FF, but let’s say I’ve got the colour AE83FC, which is a complicated colour, how the heck would I find a lighter or darker version of it automatically? I figured the […]
UIColor CMYK and Lab Values?
I have been trawling the web for a solution but have managed to find one which works yet. Simple question, more than likely complex answer: How can I get CMYK and Lab values from a UIColor object (of which i know the RGB values if it helps)? I have found this regarding getting CMYK values […]
Converting from RGB to HSL with Objective C
I’m quite new to objective c but have been programming for a while. I started creating a function that would convert from RGB to HSL and back again but I get a feeling it is way too long and headed in the wrong direction. Does anyone know of a simple way to perform this conversion?
How can I convert RGB hex string into UIColor in objective-c?
I have color values coming from the url data is like this, “#ff33cc”. How can I convert this value into UIColor? I am attempting with the following lines of code. I am not getting the value for baseColor1 right. Looks like I should take that pound char off. Is there another way to do it? […]
Shift hue of an RGB Color
I’m trying to write a function to shift the hue of an RGB color. Specifically I’m using it in an iOS app, but the math is universal. The graph below shows how the R, G, and B values change with respect to the hue. Looking at that it seems like it should be a relatively […]
Converting RGB data into a bitmap in Objective-C++ Cocoa
I have a buffer of RGB unsigned char that I would like converted into a bitmap file, does anyone know how? My RGB float is of the following format R [(0,0)], G[(0,0)], B[(0,0)],R [(0,1)], G[(0,1)], B[(0,1)], R [(0,2)], G[(0,2)], B[(0,2)] ….. The values for each data unit ranges from 0 to 255. anyone has any […]
Create image from RGB data?
I’m having real trouble with this. I have some raw rgb data, values from 0 to 255, and want to display it as an image on the iphone but can’t find out how to do it. Can anyone help? I think i might need to use CGImageCreate but just don’t get it. Tried looking at […]