Search code examples
iphonecocoa-touchuikituiimagecore-graphics

How to scale up an UIImage without smoothening anything?


I want to scale up an UIImage in such a way, that the user can see the pixels in the UIImage very sharp. When I put that to an UIImageView and scale the transform matrix up, the UIImage appears antialiased and smoothed.

Is there a way to render in a bigger bitmap context by simply repeating every row and every column to get bigger pixels? How could I do that?


Solution

  • #import <QuartzCore/CALayer.h>

    view.layer.magnificationFilter = kCAFilterNearest