Tag: uiimage

How can I 'cut' a transparent hole in a UIImage?

I’m trying to cut an transparent square in a UIImage, however I honestly have to idea where/how to start. Any help would be greatly appreciated. Thanks!

How to create an image from UILabel?

I’m currently developing a simple photoshop like application on iphone. When I want to flatten my layers, the labels are at the good position but with a bad font size. Here’s my code to flatten : UIGraphicsBeginImageContext(CGSizeMake(widthDocument,widthDocument)); for (UILabel *label in arrayLabel) { [label drawTextInRect:label.frame]; } UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); Anybody can help me […]

UIImage imageNamed requires pathForResource?

How necessary is it to search for a path to an image using the NSBundle method pathForResource when creating a UIImage using imageNamed? I see tutorial codes that just specifies the name of the image directly, and then code that goes the extra mile to find the path first. In my experience, I’ve always just […]

Adding Images to UIActionSheet buttons as in UIDocumentInteractionController

Is it possible to add an image to the buttons of the UIActionSheet as seen in UIDocumentInteractionController? If so, please let me know how it is done.

Save Photos to Custom Album in iPhones Photo Library

I’m trying to create a custom album in the Photo Library of an iPhone and then save photos that I’ve taken with the camera, or chosen from the phones Camera Roll to that custom album. I can successfully create the album but the photos are not getting saved there, instead they are getting saved to […]

Uploading Image via POST in Objective C

I’m currently working on uploading an image to a server via HTTP Post and can’t seem to figure out a way to build the url that calls the service. The user selects an image from the library or camera and then calls a json service that performs the insert statement. The service is expecting the […]

How to display a base64 image within a UIImageView?

I got this Base64 gif image: R0lGODlhDAAMALMBAP8AAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAACH5BAUKAAEALAAAAAAMAAwAQAQZMMhJK7iY4p3nlZ8XgmNlnibXdVqolmhcRQA7 Now I want to display this Base64 String within my IPhone App. I could get this working by using the WebView: aUIWebView.scalesPageToFit = NO; aUIWebView.opaque = NO; aUIWebView.backgroundColor = [UIColor clearColor]; [aUIWebView loadHTMLString: @”<html><body style=””background-color: transparent””><img src=””data:image/png;base64,R0lGODlhDAAMALMBAP8AAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUKAAEALAAAAAAMAAwAQAQZMMhJK7iY4p3nlZ8XgmNlnibXdVqolmhcRQA7″” /></body></html>” baseURL:nil]; Is it possible to do the same thing […]

Unknown reason to receive Memory Warning

let me come to issue fast. There is no problem in my code so far. My only concern is Memory management. Let me make my app logic clear. When App is launched globally NSmutableDictionary is declared and nearly 300 images are added to that Dictionary with various keys and images are added using pathForResource:ofType method. […]

Display image from path in imageView in ios

This question already has an answer here: Loading an Image from documents directory 6 answers

UIImage from URL difficulty

The following code works to load a UIImage from a URL. However, when I try to load an image from Craigslist, the image does not work. I have verified the craigslist imagePath is working. NSURL *imageURL = [NSURL URLWithString:@”http://img.ioscake.com/iphone/car-530.jpg”]; NSData *data = [NSData dataWithContentsOfURL:imageURL]; UIImage *img = [[UIImage alloc] initWithData:data] ; self.imageView.image = img; I […]