average color value of UIImage in Objective-C

前端 未结 2 585
后悔当初
后悔当初 2020-12-28 22:23

I need the average color value of an image in objective c. I want to create a color gradient of it. Has anyone an idea?

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 22:50

    There is a method to create the average color from Image.

    [UIColor colorWithAverageColorFromImage:(UIImage *)image];
    

提交回复
热议问题