uiimage

How do I resize a picture using UIImageView so that I can zoom in and out?

In my view I have a picture.. The picture has a 3:2 scale and is huge, resolution wise. I'm having a lot of trouble initializing a UIImage with the image to the original size and then zooming out of the UIImageView so that the entire image is visible within the scrollview. The program stays only in the portrait orientation. And no, pl...

UIGetScreenImage() in Landscape?

I use the following code to get a screenshot of the screen and save it to the photo albums. CGImageRef screen = UIGetScreenImage(); UIImage *screenImage = [UIImage imageWithCGImage:screen]; UIImageWriteToSavedPhotosAlbum(screenimage, nil, nil), nil); This works great but if my app is in landscape mode the saved image does...

Drawing image at same position/size/rotation on a larger resolution image

I open an UIImagePickerController where the user can see "through" his iPhone and position a (product) image on top of the camera view with different gestures. The position, size and rotation of the product image can change. The user can then create a snapshot of the background image from the camera with the product image on top of it. ...

Did OS4 change how the iPhone reads code?

The code I wrote for 3.2 performs differently in OS4. Still no errors, just new bugs. So I'm initializing the imageView inside an IBAction called "randomize" that produces and random number that goes to one of 86 cases producing a resulting animation and image, the only difference in code between 0 and 86 is that final imageView.image ...

Cannot write(add UIImage) to photo album

I have the following code - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{ NSLog(@"failed"); } which checks for the error, and it prints out time I run the following -(IBAction) addWallpaper{ UIImageWriteToSavedPhotosAlbum( [UIImage imageNamed:[NSString stringWithFormat:@"%d....

Save and Retrieve of an UIImage on CoreData.

In my app, I am trying to save and retrieval of an image in core data. I am able to save an image successfully after convention of UIimage into NSData, But when I am trying to get an image as NSData it shows output as given below, case 1: When trying to display as a string from DB. <Event: 0x5b5d610> (entity: Event; id: 0x5b5ce30 <x-...

Button to populate image from array

Hey guys i have an image view, with a popover controller. There is an array called detailitem which loads images into the image view. All i want is a button to load next image in array into the image view how would i write this? Here is my attempt it doesn't work? -(IBAction) nextitem { NSString * imageName = [NSString stringWithF...

Creating a UIImage from another UIImage using imageWithData returns nil

I'm trying to retrieve the image data from one uiimage, modify it, and create a new uiimage from it. To start, I tried just copying the data without any modification to get the basics down - but that fails (UIImage +imageWithData: returns nil). Can anyone see why this wouldn't work? // I've confirmed that the follow line works UIImage...

Problem to localize images for iPhone in xcode 3.2.3

Hi all Friday afternoon and all but hope that different timezones will help me with this... I have four files that I have localized in my project. Localizable.strings InfoPlist.strings AppData.plist AppImage.png For these files I have a .lproj folder for spa (Spanish) and por (Portuguese). It works fine with the strings in the a...

Is it possible to know if an image is in the iPhone system cache?

I am trying to improve scrolling performance of a UITableView. I am loading the images using imageNamed: and dispatch_async, but scrolling is very good once the images have been loaded into the cells. I would like to fade in the images only if they are not in the system cache to reduce the jarring effect of the images "popping" into view...

Use an image as the UITableView separator

I got an UITableView on my project and I need to customize the separator. I want to use an image instead of a color. I tried using the +colorWithPatternImage: UIColor method with no luck. ...

Problems with images on iPhone

In my application I use lots of images based in interface builder. The problem with this is that it uses large amounts of memory because interface builder caches it much liked "imageNamed" so I've begun removing the image from imageViews in interface builder and instead adding them once the view starts using "imageWithContentsOfFile". Af...

Resizing a UIImage on the iPhone with a small memory footprint

I've seen this question asked dozens of times but never answered. How do you resize a UIImage (specifically one returned from the UIImagePickerController camera). When I try any of the methods that are out there I get a memory spike between 20 and 40MB. It does go away but I know that on some hardware this is completely unacceptable. I...

multiple uiimages in the same view

Hello, i'm developping an application for kids (memory game): turning two same tiles(images) and you can remove them. the problem is how to turn the uiimages with animation and only the uiimages without turning the view that contain them.. do i have to put every uiimage in a small view? any ideas? PS :i'm not using OpenGL ...

leak in UIImage?

why is this piece of code showing a leak in the "Leaks" program? btnFaceBook = [UIButton buttonWithType:UIButtonTypeRoundedRect]; UIImage *faceBookImg = [UIImage imageNamed:@"facebook.gif"]; [btnFaceBook setBackgroundImage:faceBookImg forState:UIControlStateNormal]; I'm not doing alloc on UIButton or on UIImage. ...

Cocoa Touch - Comparing Images

How can I compare an image to another one? Thanks! ...

How do I set the background (window) for a tableview to an image?

I have set the background colour of my UITableView to clear so that I can see the UIWindow. But I want to change the image presented (from background.png), depending on my selection. An example would be: If (selection = 'blue') then image = bluesky.png if (selection = 'green') then image = 'greengrass.png thx, wes ...

compare uitextfield input with responseData of ASITTHPRequest

Hi, I am writing an application for Registration form (with fields--> firstName, EMail, password, postalCode etc.,.). while, user enters value in first textfield(ex: firstName in my app), it should connect to the remote URL.. and check the user entered value with the responseData(0/1). (1)How to check 'firstName.text' (IB field) with r...

How to perform an action after a moving UIImage reaches a specific point

i am trying out a pong game to start out developing games on the the iphone and i've got everything moving but i need to implement the scoring and make the ball return to the center of the screen this is the code i have currently in the touchesBegan method: if(ball.center.y >=444) { computerScore=computerScore+1; compute...

Capturing snap of UIWebView

I want to take a snapshots of a specific area of UIWebView by giving x, y coordinates and dimensions. Is there any way I can achieve this? I am using the current code but I am only able to get the image of visible area on screen only. How can I get the image of the area which is not visible? UIGraphicsBeginImageContext(rect.size); ...