Amit Vaghela
Amit Vaghela

Reputation: 2970

Change the resolution of image in iPhone?

I wanted to change the resolution of a image,this image I am getting from remote location.The image I am getting is too large to fit in iPhone screen is their any way to change that resolution?

Upvotes: 0

Views: 2496

Answers (4)

Elliot
Elliot

Reputation: 6136

If you're looking to actually resize a UIImage to smaller dimensions, this blog post might help.

Upvotes: 0

schwa
schwa

Reputation: 11942

If you're using a UIImageView then UIView's contentMode is what you need, you should probably set it to UIViewContentModeScaleAspectFit (or the equivalent in Interface Builder).

Upvotes: 1

Airsource Ltd
Airsource Ltd

Reputation: 32642

If you render it, it should scale anyway (see UIImage::drawInRect) However, CGContextDrawImage will scale draw an image into a new context, which you can then use to render to the screen.

Upvotes: 0

Lounges
Lounges

Reputation: 4664

Assuming you are using some kind of "View" to display the image (rather than custom drawing) you might see if there is some kind of property which would allow you to set the "Mode" of the view to allow various scaling methods.

Upvotes: 0

Related Questions