Reputation: 2970
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
Reputation: 6136
If you're looking to actually resize a UIImage to smaller dimensions, this blog post might help.
Upvotes: 0
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
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
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