2016-05-09 60 views
0

我在ios上的应用程序工作,我需要的工具或代码只改变图像的脸部颜色。更改面板颜色从xcode中的主颜色

我已经在uiimage脸上了。

现在如何将RGB颜色更改应用于该面部的Uiimage?

在此先感谢

enter image description here

+0

你想在改善屏幕颜色方面改变脸色吗? –

+0

这是一个非常复杂的问题,并没有“只是xyz”的答案。最简洁的答案可能是使用Color Cube Core Image过滤器,并创建一个颜色立方体,将脸部中发现的颜色范围映射到新的颜色范围,但这不是一件容易的事。 –

+0

@NimitParekh是改变皮肤颜色像白色的脸到一些黑暗或一些黑暗的脸的人的脸颜色改变为白 –

回答

0

你可以做这样的事情,

UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(50, 50, 50, 50)]; 

imageView.image = [UIImage imageNamed:@"Synch"]; // your face image here 
imageView.image = [imageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 

// imageView.backgroundColor = [UIColor yellowColor]; 
imageView.tintColor = [UIColor redColor]; // set different tint color here and image will get that color 

[self.view addSubview:imageView]; 

图片应该是png文件。示例中同步图像采用png格式。

希望这将有助于:)

+0

我试试这个,但它不工作我我更新scrrenshot后使用你的code.it不显示脸和使它满红 –