uiimage

adding UIImageView to UIScrollView throws exception cocoa touch for iPad

I am a noob at OBJ-C :) I am trying to add a UIImageView to a UIScrollView to display a large image in my iPhone app. I have followed the tutorial here exactly: http://howtomakeiphoneapps.com/2009/12/how-to-use-uiscrollview-in-your-iphone-app/ The only difference is that in my App the View is in a seperate tab and I am using a dif...

what is the proper way to set a UIImageView with a UIImage?

I have a UIImageView that starts off with an image (loading.png) specified in IB. When my app starts, a new image is downloaded from the internet to replace the existing one. I do the following to replace the image: if(object.imageView.image != nil){ [object.imageView.image release]; object.imageView.image = nil; } ...

Is it possible to get a CATransition animation as UIImage?

Hello, is it possible, to get a CATransition animation as UIImage? I make a example: CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:0.35]; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; animation.type = @"pageCurl"; an...

To add UIImage directly to file.

Hi, I want to add my UIImage directly into the file instead of converting into UIImagePNGRepresentation or UIImageJPGRepresentation(as it takes time) like:- UIImage *im = [UIImage imageWithCGImage:ref]; [array addObject:im]; NSData *data = [array objectAtIndex:i]; [data writeToFile:path atomically:YES]; But it is showing error. So the...

UIImageView Centering Problem.

To understand my problem let's follow this steps. Open - XCode -> New Project -> View based application. Open View Controller.xib file. Drag an image-view into viewController's view. Place that image view on center of viewController's view. Apply size of 125x125 to image-view. Take any image with dimension of 320 width & 460 height. Dr...

How to save a png image to camera roll?

I'd like to save screenshots from my game to camera roll. Right now I'm using UIImageWriteToSavedPhotosAlbum which saves the image in jpg format with way too much ugly jpg artifacts. Is there a way to save an UIImage in png format to camera roll? ...

UIImage: make an image look like a shadow

How do I make a UIImageView show the "shadow" of the the UIImage in it? I have a dog.png file, but I just want to show the shadow of the UIImage so when I press a button it reveals the real image of the dog. so I want something like this: and after I press the button It shows the real Image: Please give me a hand on this. ...

capture image tag from multiple images

Hello, I have a .xib file containing 30 images and each image has a unique tag. How could I capture this tag in order to know which image has been touched when (void)touchesEnded??? How to define that images, on an array? Thanks for any idea to solve it!! ...

Rendering UIImage/CGImage into CGPDFContext results in... blankness!

Hi all, I'm trying to take an image that I have in a image object and render into a Core Graphics PDF context-- happens to be on an iPhone but this question surely applies equally to desktop Quartz. This UIImage is a simple color-on-white image at about 600x800 resolution. If I (say) turn it into a PNG file, that file looks exactly as ex...

iPhone: UIImageView not showing images

Hello, I've got UIImageView drawn in my nib-file and it's connected to a imageView iboutlet. I can load single pictures which will show up very nicely, but when it comes to drawing many images separately as like an animation, images won't show. I've got drawImage() function which takes NSData-objects(image data) and draws it to a screen...

iPhone: CALayer Memory Leak question

Would the code bellow cause my code to leak? More specifically, am I responsible for releasing the newImage or the contents of mainPageLayer (which is a CALayer object)? I get a memory warning every 4th time that method is called, but cant figure out why... I also can't figure out why mainPageLayer.contents = [newImage CGImage]; throws ...

Why would a file created and stored in the iPhone Documents directory be inaccessible when rerunning my application?

This is driving me crazy! I would really appreciate your help... My app saves a .png (referencing a photo taken within the app) to a file in the iPhone Documents directory. The app then creates and displays a UIImage from the file with no issues - but only until the app is rerun an arbitrary number of times. I think this may be related ...

Issue with UIImage files not being found on phone

Note: Using Monotouch. I have a directory called Images where I have all my PNG files. In my code I have the following _imgMinusDark = UIImage.FromFile("images/MinusDark.png"); On the simulator it runs fine, on the phone it's null. I have the Images folder content (all the PNGs) in my MonoDevelop marked as Content in terms of Build Act...

Retrieving a pixel alpha value for a UIImage (MonoTouch)

This question is a duplicate of 1042830, but MonoTouch-specific. Is there a way that's safer than allocating an IntPtr, drawing into it using CGBitmapContext and then reading bytes at the appropriate offset? ...

UI Image rotation is not working

hi, I am developing UI Image based app. i am rotating image using context it giving complete white screen . image is not getting.i used all methods provided by stack overflow , but not able to succeed. Finally i tried using UI Image-view its also not giving rotating image. pleas provide a better option for me. thanks in advance. ...

Signal "0" error while scrolling a tableview with images

Hi, I have a problem while scrolling images on tableview. I am getting a Signal "0" error. I think it is due to some memory issues but I am not able to find out the exact error. The code is as follows, - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSStri...

Two Problems I'm having with UIButton and UIView.

Hi all, I haven't been programming on the iPhone for very long, but I'm picking it up slowly by googling problems I get. Unfortunately I haven't been able to find an answer for these. I have started a new View-based application in Xcode 3.2.2 and immediately added the following files: myUIView.m and myUIView.h, which are subclasses of ...

How can I put an image inline with an NSString on the iPhone?

I know you can do it on Mac OS X with NSAttributedString but I haven't had much luck with that on the iPhone. I'm trying to basically do a string like "$200" except the dollar sign is replaced by a custom symbol. ...

How create UIImage from bytes ?

Hello, all! I need in UIImage created from my colors (for example, i need in image 1x1 pixel with black color). I've got array: unsigned char *color[] = {0, 0, 0, 1}; How can i create UIImage from this array ? I've try unsigned char *bytes[4] = {0,0,0,1}; NSData *data = [NSData dataWithBytes:bytes length:4]; UIImage *img = [UII...

Animate move and scale of image UIButton

I want it to be animated so I'm using [UIView beginAnimations] I've tried animating using button.imageView.frame (with image set as imageView) but it only animates the position, the image doesn't get scaled down at all. using hateButton.frame (when image is set as backgroundImage), the backgroundImage gets scaled down but it's not ani...