How to pixelate an UIImage?

2019-09-04 22:56发布

问题:

are there any filters to pixelate an image programmatically in iOS?

If not, how can i pixelate an image in easy way?

thanks.


Like pixel effect on eBay app for iPad (menu drag to open, on the top left)

回答1:

If you mean pixelize, you can take a look at both these links

How to pixelize / add pixelating effect to a UIImage in iOS

or

How do I perform a fast pixellation filter on an image?



回答2:

How about the use the Core Image filter named CIPixellate? I posted the code snippet in this Answer of How do I perform a fast pixellation filter on an image?