uiimage

Embedding a UITextView in an image

I have a UIImageView displaying a picture that I took with the iPhone Camera. On top of that, I have a UITextView in which the user can type stuff that describes the picture. I would like to create a combined image of the two views and send it to a server. Anyone knows how I can do that (just creating the image. I know how to send it)...

How to improve blending performance to make smooth scrolling?

Fast intro Edit: I have 9 cells. All 9 cells contain bundle image. 7 bundle images have some kind of transparency (in file, not as a blending option in code) to load images from web underneath them. The scrolling problem affects the table view when both bundle and web images are loaded into arrays as UIImage objects. If I disable draw...

ALAssetRepresentation fullResolutionImage's UIImageOrientation is wrong

Hi all, I'm trying to ALAssetLibrary to fetch pictures in Photos app, but recently I found a problem, when I get the CGImageRef from ALAssetRepresentation, the UIImageOrientation is wrong(rotated 90 degree), but when I get width and height from the CGImageRef, they're wrong either, now how could I get the right CGImageRef or use the CGIm...

Lazy image loading & unloading memory allocation problem.... Aaaargghhh ...

Hi there. I am building a scrollview which swipes through 100 images of houses. It works. But.... For every image viewed the allocated memory inscreases by 2.5 MB. In the end the app crashed because it ran out of memory. Even if I use the same image as specified in the code below, I run out of memory because of the memory allocations. ...

What is the fastest way to generate a new UIImage from transforms applied to an existing UIImage?

I am attempting to take an image captured from the rear camera, apply a scaling transformation to it and then output a new image with the same size of the original but scaled up. What I have below works ... BUT it is slow (especially the code in between the UIGraphicsBeginImageContext(size); and UIGraphicsEndImageContext();) Is there a...

Progress bar on iPhone using UIImages

I'm designing a progress bar for an app that essentially is two UIImages - both are the exact same size (long rectangles with rounded corners), except they are colored differently. The bottom bar is black and the progress bar that will fill over it is grey. Displaying the bottom bar is easy enough. The issue I'm trying to figure out is...

UIImage has unwanted gradient when stretched in a UISlider

I have created a two 7x30 image, one with a 3 pixel black border and a transparent middle, the other with a white middle (min.png and max.png). I am using these two images as the Track Images for a UISlider like this: [self.progressBar setMinimumTrackImage:[[UIImage imageNamed:@"min"] stretchableImageWithLeftCapWidth:3 topCapHeight:3] ...

how can i assign image name to string variable

I am new to iPhone. What i need is i have to assign image name (eg.parrot.jpg) to NSString value.i need to display image in imageview using this string variable. apporxmatly imageview.image = NSStringvarible; where NSStringVArible is image name. How can i done this? ...

clipping a UIImage as per a polygon

How can I let the user of my iphone app to clip a UIImage by a dynamically generated CGPath. Basically I display a rectangle overlaid on a UIImageView and the user can move the 4 corners of the rectangle to get a polygon with 4 sides. The rectangle is not filled so you see four lines overlaid on an image. The user should be able to clip...

App failing to see @2x images

This is driving me nuts. Been searching for 2 days, and I can't find any real solution or explanation for why this is happening. I know there are threads here on SO, as well as some other places, but they have been no help. I have read the Apple documentation on the matter. I have normal and @2x images in my app. They are named correctl...

Uiimage memory leak

.h file UIImage *ownImg; @property (nonatomic, retain) UIImage *ownImg; .m file In viewWillAppear method: UIImage *myImage2 = [UIImage imageNamed:@"thumbnail.png"]; self.ownImg = myImage2; That is a leak in ownImg, anyone know why it leaking? BTW, what is the different of using self.ownImg and without the self. Thanks. ...

saving UIImage to file cost a lot of time

I'm trying to load pictures in iPhone Photos app, then save the selected pictures in to my app's folder, using ALAssetsLibrary, and have two issues: 1. the image file saved to disk is much bigger then original files in Photos app, for example, a picture is 2.8MB, but after saved to my app's folder, it's 6.4MB, following is the code: ...

centering a CGRect in a view

I have an image displaying in a CGRect. how do I center the rect in the view? here's my code: UIImage * image = [UIImage imageNamed:place.image]; CGRect rect = CGRectMake(10.0f, 90.0f, image.size.width, image.size.height); UIImageView * imageView = [[UIImageView alloc] initWithFrame:rect]; [imageView setImage:image]; I've tried imag...

App Crashing when using large images on iOS 4.0

Hi everyone, I've been having a problem to show large images on a scrollview, the images are 2,4 - 4,7 MB. It runs fine on the 3GS and on the simulator. But whenever I try to run on a 3G or iPod Touch 2G, it crashes. I searched across the web and found the "imageNamed is evil" article. Ok I changed all my image calls to imageWithConten...

iPhone: UISegmentedControl with custom images on pressed state

I am using a UISegmentedControl with some custom images: UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:nil]; [segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"0.png"] atIndex:0 animated:NO]; [segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"1.png"] atIndex:1 animated:NO]; [seg...

scaling UIImages for higher res iPhone displays using only the 3.2 SDK

Hey all, So the problem I'm having is I have a UIImageView that is 100 x 100 on the iPhone (200 by 200 on the iPhone 4). I'm retrieving an image from a server that is 200 by 200 pixels and setting my UIImageView to it. This looks fine on the iPhone, but looks blurry on the iPhone 4. I think my problem has to do with UIImage scale prope...

CocoaTouch: are there stock icons available when creating a UIImage (file, folder, etc)

Are there any stock images that come with the system that I can use to fill a UIImage? For example, if I want a picture of a folder, do I have to include the image with my app? Or is there a system wide folder image I can load/display. ...

convert an hex string to a NSData

How can I convert a string in hex format to retrieve from it an NSData and after that an UIImage inside of my iPhone app? I've got a string (str) that contains a value like X'FFD8FFE000104A46....01010000010001000'. That string is created from a xml file by the method: - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)st...

iPhone SDK: Converting/uploading an image to a SOAP service

I'm having issues converting/uploading a camera image to a remote SOAP web service. Here's the code for converting the image to a byte array: UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage]; if (image == nil) image = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *imageData = [NSDa...

Large UIImage drawinrect extremely slow on selection

I have a custom UITableView cell that sports an Image, and a headline. I used the fast scrolling example of ABTableViewCell from atebits. It seems when I select the first row (which is my row with the largest image) it takes a considerable amoun of time to highlight the row, and then push the new view controller. However when I select ...