uiimage

How to deal with image resizing for different orientations

I've been following this excellent resource here: http://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more and based some of my code off it. But can't seem to get my head around how to accomplish what I want to do. Basically, I want to take any image from the iPhone (landscape or portrait) and display ...

Setting Address Book image for a contact doesn't seem to work

I'm trying to set the contact image with the code below. I am not seeing any errors, and the image is not saved to the contact entry in the address book. Please help! I must be doing something wrong... - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecord...

image caches (sqlite)

hi there i'm new to iPhone dev so plz be gentle ... i've created an iphone app which uses CoreData sqlite DB i've very more than 50 pic with huge size in my DB when i display an image it won't be deleted from memory when i get out from the view (cache) -(void)loadView{ [super loadView]; self.title = @"Photo"; imageScrollVi...

Reverse icon from white to black, tool or iPhone sdk.

I have successfully placed an image into the lefthand ImageView of a default UITableViewCell and this shows up as a white image over the background blue of a selected row. However the image is invisible when the table cell background is white. The image came from a 3rd party iPhone tabbar icon set, hence it is white. Can I programatical...

What's the fastest way to load big image on iPhone ?

Should I use UIImage or CGImage ? Png or Jpg ? I've read the doc and tried different things but did not notice significant improvement. Loading an image can take 1 good second which seems slow ...

uiimage allocation problem

I have 3 UIImages in UIScrollView and I am initializing these images in the following way: UIImage *dimage = [[UIImage alloc] initWithData:data]; Where data is a NSdata gotten from url request. After this I am caching the images. When I check memory allocation the 3 images takes up 472 Kb each and allocation has been requested by "img...

can a UIImageView be warped? (iPhone)

I'm curious if it'd be possible to warp a UIImageView on the iPhone. I was thinking of stretching an image around a curve. Possible or no? ...

What's the default size for the UIImage in a UITableViewCell?

I want to put a UIImage in the left side of each row in a UITableView. This is pretty standard, and is supported directly by UIKit. But putting in a (large) image causes all kinds of wonkiness, so presumably I'm supposed to scale the thing correctly myself. But none of the docs give a default size for this image using the standard out of...

how to scale and get mirror image after rotating a UIImage?

hi all, my app has a photoshop like feature wherein the user can create a new image which is a combo of "n" number of images(sub imageS). the user can rotate, flip and zoom these sub images by selecting them one at a time. and in the end save the whole canvas as a image. My problem is once the sub-image is rotated and then if i try to f...

Problem filling NSMutableArray w/ UIImage objects

I am having a baffling issue while trying to fill an NSMutableArray with UIImages. CGBitmapInfo bitmapInfo = kCGBitmapByteOrderMask; CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); while(...) // <--- Iterates through data sets { CGDataProvide...

Implementing "add photo" button similar to the iPhone contacts app

I was curious if anybody knew the process to create an "add photo" image tile similar to that in the iPhone contacts app. It seems to be on the same level as a UITableViewCell which is shortened (if this is the way it is done). I've read a suggestion dealing with Headers or custom UITableViewCells but nothing definitive on how it was do...

iPhone - adding UIImage to array causes long loading time

I have 4 different types of imagearrays to use for animations. Each animationsequence consists of 14 png's that are 64KB each. Using Shark, it's obvious that this is the culprit to the long loading time. I'm not sure how much quality I can sacrifice but I assume lowering the size of the images by half would roughly reduce loading time ...

What's the right memory management pattern for buffer->CGImageRef->UIImage ?

I have a function that takes some bitmap data and returns a UIImage * from it. It looks something like so: UIImage * makeAnImage() { unsigned char * pixels = malloc(...); // ... CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, pixels, pixelBufferSize, NULL); CGImageRef imageRef = CGImageCreate(..., provid...

Cocoa Touch - How to cache a CGImageRef or UIImage (not using imageNamed:)?

I have a lot of images in my app so I decided to do some loading in a background thread, and since UIKit isn't thread-safe, I filled arrays with CGImageRefs. However, they are not cached and I need to be able to access them fast so my question is: How to cache CGImageRef, or cache the UIImage derived from it later on in the main thread?...

Set graphics context to display UIImage (Obj-C)

Hi, I'm trying to render a UIImage in Objective-C (working on a simple iPhone app (breakout-type thing) to get used to the environment). However, I'm getting an "Error: CGContextDrawImage: invalid context" error when I try and draw it. My question is: how do I set the context that the DrawAtPoint method of UIImage uses? Here the rele...

Creating UIImage with per-pixel alpha from GL buffer

Hi, I'm trying to take my gl buffer and turn it into a UIImage while retaining the per-pixel alpha within that gl buffer. It doesn't seem to work, as the result I'm getting is the buffer w/o alpha. Can anyone help? I feel like I must be missing a few key steps somewhere. I would really love any advice on this. Basically I do: //Rea...

Changing image property upon button press

i have a UIImageView displayed in my view with an image "image1" already set. I have a button below it. During runtime i would like the image to change to "image 2" when the button is pressed and upon release i would like the image to display "image1" again 1) I know that i have to give the UIImage a label or something so that i can a...

problem in adding image to the UIButton.

Hi friends, I got an another problem in my application and I am wasting so much of time on that. Does pls anyone can help with this problem. Actually I had an Event and I should give rating for that event for that I wrote the code as: In CellForRowAtIndexPath......I had the code as: - (UITableViewCell *)tableView:(UITableView *)tv cell...

Random image display using rand()

Im just fiddling around with small apps, trying to learn the SDK and ObjC 2. Im trying to display an image randomly and I keep finding different ways up displaying a picture. I have uploaded the picture into the SDKs resources folder. Anyway, here is my code. Can someone steer me in the right direction. #import "randomViewControlle...

How to get the filename from a given UIImage object?

How to get the filename from a given UIImage object? ...