实用iOS图片工具
UIColor *whiteColor = [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:1.f];
// extract bright colors and avoid results if close to white color
self.colorArr = [self.imageView.image extractColorsWithMode:JYExtractModeOnlyDistinctColors avoidColor:whiteColor];
UIColor *color = [self.imageView.image pixelColorAtLocation:point formImageRect:self.imageView.frame];
BOOL isEqual = [self.imageViewOne.image isEqualToImage:self.imageViewTwo.image];
if (isEqual) {
//...Do something..
}
else {
//...Do something..
}
JYImageTool
子目录中的所有文件。JYImageTool.h
。JYImageTool 在 MIT 许可下发布。有关详细信息,请参阅 LICENSE 文件。
实用的iOS图片工具
UIColor *whiteColor = [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:1.f];
// 提取较附近更亮的主色,并忽略太接近白色的提取结果
self.colorArr = [self.imageView.image extractColorsWithMode:JYExtractModeOnlyDistinctColors avoidColor:whiteColor];
UIColor *color = [self.imageView.image pixelColorAtLocation:point formImageRect:self.imageView.frame];
BOOL isEqual = [self.imageViewOne.image isEqualToImage:self.imageViewTwo.image];
if (isEqual) {
//...Do something..
}
else {
//...Do something..
}
JYImageTool.h
。JYImageTool 使用 MIT 许可证,详情见 LICENSE 文件。