Photoshop magic wand-like action in an iOS app - iphone

Is there a way to use a magic-wand tool (like in Photoshop) in Xcode for iPhone? What I want to do is to cut out the background of an image (a person standing in front of a white background) to make the background transparent.
Edit:
i think i was not specific enough, sorry. I would like the iPhone or iPad app to automatically remove the background of an image just taken with the camera. Thus, i can't use Photoshop for it and need a function or so to do this. I was thinking about a "flood fill" kind of solution similar to this:
http://www.codeproject.com/Articles/16405/Queue-Linear-Flood-Fill-A-Fast-Flood-Fill-Algorith
but was hoping that there is a more convenient solution especially for "cutting" out custom shaped areas of an image.
Thanks!

Floodfill assumes a uniform background color; on a real life photo, it won't ever be uniform. What you need is a Chromakey algorithm. See here:
Green screen / chroma key iOS

Related

How to segment an image in iOS to remove background and retain the foreground picture

I need to segment an image in ios for a fashion app by keeping only the foreground image and removing all other background part of the image which should resemble like a tool for removing the background of images in various photo editing tools please help me.
General background subtraction is an unsolved problem, so getting perfect results is going to be a big effort. With that said, you can probably get close. Here are a couple of suggested avenues:
I am guessing that your app will place clothes on a human, or something of the sort. Instead of getting a perfect segmentation, run a person detector, remove all of the image except for the detected person, and fit a part-based human model to the remaining image. Then you have the pose of the person, and can do your image processing accordingly.
Allow the user to input some strokes from the foreground and some strokes from the background, and run a graph-cuts-based image segmentation algorithm on the frame.
Begin your process by having the user not be present in your video stream. From this, learn the background distribution (start with a simple histogram of background pixels, there are much more elaborate schemes but you need a starting place). Then, when the user enters the scene, create a binary image containing the connected components that don't fit into the learned background distribution. This will not be perfect, but you will start to see something close to a binary image where the white pixels are your user, and the black pixels are the background. Use morphology operators to join any large connected components that are slightly separated, and threshold your image to remove small noise in the image, from things like specular objects and illumination changes.
Like I said (and is mentioned in the comments), this is not an easy problem, but you can come up with a good approximation if you put some time into it. I suggest the third method I listed. It is achievable, and can be broken down into small parts so you can tell when you're making progress.
Good luck!

iOS Trim Square Image to make rounded app like in app store

I'm grabbing app images from the iTunes affiliate program. Unfortunately Apple provides a square .jpg image which does not have the smooth rounded edges. How can I programmatically take the provided image and round the edges?
The only way I can think of how to do this is set the image as the background of a view, and then round the layer borders until it cuts off what I don't want to see. Is this a good approach?
I don't see any problem with that approach, I was going to suggest the same thing.

Coding a photoshoped GUI for iOS devices

well... I have searched for a while on topics of coding given GUI elements by designer in photoshop format. But I have a really hard time getting it together. Just for an example. When I would like to make an app with only a simple LCD-Display with a timer, counting down, how would I start there..... Don't get me wrong, I am aware of doing the code behind the scenes to make the timer count etc.
But what about setting up a nice looking gui with glossy display effect? What is a "correct way" to implement such a gui? Taking a Photoshop file showing a glossy display and setting a UILabel on that? or coding the gloss effect programmatically?
This is just one example... hm... I do not find good ressources for getting a start on such a topic. I would be really gladful if you could give me a helping hand for a start.
In the typical app development cycle, you would have the graphics people delivering graphics to the programming people, in the form of PNG files.
However, it is very well possible to render all kinds of things on the fly on the device. The blue shade on the tab bar icons in any app using UITabBarController is a clear example: the programmer puts in a PNG with just the alpha channel, and the system renders the blue shading.
Using Quartz Core (look for CGContext in the documentation) you can draw lines and text, and apply all kinds of transformations, gradients, clipping paths, etc. Using this you can create your own styled subclasses of UIView and such.
The PNG approach is generally the easier way.

iphone large icon 512x512 with border glitch?

I just uploaded my first iPhone app. The app icon has a border, sort of like the "settings" icon. However, when I upload my large icon in iTunes connect, there are some weird white edges in the corners. It appears that they might use a smaller corner radius or something. How can I make sure it will display correctly on the apple store?
The image is a jpeg with no transparency.
Thanks for the help!
What's happening is the appstore is expecting a purely square 512x512 image. It then masks it to have rounded corners and then adds a drop shadow automatically.
If you want it to have a specific border like what you've designed you need to match their rounding exactly.
If you search around. there are PSD templates available that will help you design it (i.e. they have the exact mask that itunes uses).
Here's an example: http://www.pixelresort.com/blog/app-icon-template/
Another technique which can work really well is leaving the outer part of the icon square — in your case, the dark brown outer border would extend to the edge of the canvas – and let the roundrect mask handle the corners for you. There's a bit more info in this excellent blog post: All the sizes of iOS app icons
You'd still get the border effect, but let it be cut cleanly by the mask rather than by your icon's transparency.
I believe this to be a bug with iTunes Connect. I've seen the same problem, but it only appears on the Versions summary screen.
I've seen this when uploading a square icon. For example:
In summary, don't worry about it. Your icon should still show up correctly in the iTunes Store and on the Devices themselves. If your icon looked clean in the iOS Simulator and on your device, you're good to go.

Drawing the blue "unread dot" on the iPhone Mail app

Does anyone have an example of how to draw the blue "unread dot" used in Apple's Mail App? This one in specific:
Drawing an ellipse is straight forward with Quartz2d, but the subtle use of shadows+gradients make this look really 3d.
I think the blue dot in mail is actually an image; I would imagine that blitting an image would be faster than drawing a gradient.
If you decide to go with a resource there is an app called UIKit-Artwork-Extractor that allows you to rip all the resources from all the IOS apps you have installed
https://github.com/0xced/UIKit-Artwork-Extractor