uiimageview

UIImageView scaling/interpolation

I have a small IPhone app that I am working on and I am displaying an image with a UIImageView. I am scaling it up using the Aspect Fit mode. I would like to have the image scale up with no interpolation/smoothing (I want it to look pixellated). Is there any way I can change this behavior? A little more general question would be ca...

Combining images

I want to place the picked image ontop of another image, so that my picked image wil be placed in some sort of frame i made in photoshop. After combining the images i want to save it to the disk. Does anyone knows how to do it, or mayby a link to examples? ...

My rotated image doesn't have sharp edges

I am rotating my image with the following code: CGAffineTransform rotate = CGAffineTransformMakeRotation( [ratio floatValue] ); [imageView setTransform:rotate]; But it doesn't have sharp edges, does someone knows a solution for this? Here's the link to the image i get: link ...

10 degrees rotation image cut off

I rotate my image with: UIImage *image = [UIImage imageNamed:@"doneBtn.png"]; CGImageRef imgRef = image.CGImage; CGFloat width = CGImageGetWidth(imgRef); CGFloat height = CGImageGetHeight(imgRef); CGAffineTransform transform = CGAffineTransformIdentity; CGRect bounds = CGRectMake(0, 0, width, height); transform = CGAffineTransformRota...

iPhone UIImageView Array

So I'm declaring a NSMutableArray to hold 5 UIImageViews. .h file: @interface ImageDisplay : UIViewController { IBOutlet UIImageView *img1; IBOutlet UIImageView *img2; IBOutlet UIImageView *img3; IBOutlet UIImageView *img4; IBOutlet UIImageView *img5; NSMutableArray *imageHolderArray; } @property (nonatomic, re...

How do I release self (UIImageView) in touchesEnded?

I have an object that is a child of UIImageView. Before all these touches methods, I add this object to the superview and then user moves it. In touchesEnded, sometimes I want to release self. I've tried: - [self release] or - [self removeFromSuperview] But all these tries end up in exceptions. What's the right way to release self...

Why is my UIImageView blurred?

I have a really weird problem with UIImageView. I have an image (an RGB png) 45x45 pixels which I add to the view. I can see that image is blurred after added to the view. Here is the same image in the simulator (left) and in Xcode (right): I have custom UIImageView class with this initWithImage code: - (id) initWithImage:(UIImage*) ...

How to ensure that UIImage is never released?

I grabbed the crash log from the iPhone: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000c Crashed Thread: 0 Thread 0 Crashed: 0 libobjc.A.dylib 0x30011940 objc_msgSend + 20 1 CoreFoundation 0x30235f1e CFRelease + 98 2 UIKit ...

Resizing UIimages pulled from the Camera also ROTATES the UIimage?

I am getting UIimages from the camera and assigning them to UIImageViews to be displayed. When I do this the camera gives me a 1200 x 1600 pixel image which I then assign to a UIImageView in my Application. The image is displayed as expected in the image view under this condition. However, when I attempt to RESIZE the retrieved UIImage b...

How do I set the background of UIScrollView to be transparent?

What i ultimately would LOVE to do is having my scroll view contents scrolling (in the scroll view control), and have a static background (a wallpaper image). I've tried a combination of things, none of which really yields what im looking for, not even close really. Has anybody attempted this before? ...

UIImageView dimensions not what I set in IB

I set a UIImageView to 70x70 pixels. In the actual view they look 70px high and 30 wide. This is when there is no source UIImage set and with a background color so I can see it's layout. However, when I do set a UIImage to it the layout does not change, remains portrait. Is there something I am overlooking that affects the layout dimens...

No vertical scroll in uiscrollview w/ uiimageview subviews

I have uiimageviews as subviews for uiscrollview. I made my uiviewcontroller resize the scrollview contentsize and offset similar to how it was done here: http://github.com/andreyvit/ScrollingMadness/tree/master. The only difference is that I don't want my image views to take up the whole screen but try to stretch proportionally so I u...

moving an object without actually touching the object

Hey guys, I'm a beginner when it comes to iPhone development and i've searched for the answer to this question and haven't found anything yet. What i'm trying to do is allow the user to move an object without actually touching the object (they can touch anywhere on the screen) and as they move the object will go from where it was origi...

Zooming in on two ImageViews at once

So, I have two UIImageViews within a single UIScrollView: a map of the united states, and a marker (mostly transparent, of course). I need zooming to be a feature here, but within the viewForZoomingInScrollView method that I need to overwrite, I can only return a single UIImageView. Therefore, when I zoom, only one or the other will prop...

stretchableImageWithLeftCapWidth:topCapHeight doesn't work in initWithCoder: of UIImageView subclass

I have a UIImageView subclass called ShadowView, which displays a shadow that can be used under anything. ShadowViews are to be loaded from a nib. In initWithCoder:, I have the following code: - (id)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (self != nil) { UIImage *shadowImage = [[UIImage ...

Problems making an UIImageView opaque on the iPhone

Doing as little alpha blending as possible is an important performance consideration for table view cells on the iPhone. I have table cells that are largely comprised of one big image view. I have set the UIImageView to be opaque, in both Interface Builder and programmatically, but the CoreAnimation instrument still shows that it is bein...

Subclassing UIImage and adding to UIImageView

Can anyone help me with this. I need to do custom drawing code in -drawRect so I subclassed UIImage. How would I initialize my custom UIImage with an image? Say I override the imageName method, what would I need to do in this method? After initializing can I add it to a UIImageview like so initwithImage:? ...

iPhone Objective C: How to get a pixel's color of the touched point on an UIImageView?

iPhone Objective C: How to get a pixel's color of the touched point on an UIImageView, even if the parent UIView or itself is being rotated by the CGAffineTransformMakeRotation function? Will the view property of the UITouch still correctly return the correct pixel of the touched point even if the UIView/UIImageView is being scaled and ...

What happens to the view.frame.size attribute after a CGAffineTransform (Rotate)?

I have a UIImageView that can be resized by pinching in and out (Example: view.frame.size.width+10). The image of the Image View can also be rotated (CGAffineTransformMakeRotate). Okay, here is the problem: When I resize the UIImageView AFTER having had applied a Rotate Transform the view resizes abnormally (inversly (shrink when it shou...

Rotate UIImageView and still get x/y click position

Hi, I have subclassed UIImageView to create a soccer ball. The ball bounces and moves along an x & y axis, and depending on where you touch the ball, the ball will move as you'd expect a soccer ball would. My problem is that I would like to rotate the Ball(UIImageView), but still know the x & y positions from it's original position. ...