Iphone iOS:来自Photoshop的CIFilter(色调)值
我正在使用Iphone iOS:来自Photoshop的CIFilter(色调)值,iphone,ios,image-processing,photoshop,hue,Iphone,Ios,Image Processing,Photoshop,Hue,我正在使用色调过滤器更改图像的色调: CIFilter* hueFilter = [CIFilter filterWithName:@"CIHueAdjust" <blah blah> [NSNumber numberWithFloat:hue], nil]; CIFilter*hueFilter= [CIFilter筛选器,其名称:@“CIHueAdjust” [NSNumber numberWithFloat:hue],无]; 我有Photosh
色调
过滤器更改图像的色调:
CIFilter* hueFilter =
[CIFilter filterWithName:@"CIHueAdjust" <blah blah>
[NSNumber numberWithFloat:hue], nil];
CIFilter*hueFilter=
[CIFilter筛选器,其名称:@“CIHueAdjust”
[NSNumber numberWithFloat:hue],无];
我有Photoshop
中希望使用的Hue
编号,但它与我从iOS获得的结果不一致
是否有规则将PhotoShop中的数字更改为我应该在iOS中使用的数字?HSL/HSV颜色模式中的色调是一个角度坐标。 在Photoshop中,它以度为单位(-180到+180) 在CIHueAdjust过滤器中,角度以弧度表示。 从 参数 输入 一个
NSNumber
类,其属性类型为CIAttributeTypeAngle
,显示名称为Angle
默认值:0.00最小值:0.00最大值:0.00滑块最小值:-3.14滑块最大值:3.14标识:0.00
从Photoshop值(度)到CIHueAdjust值(弧度)的公式是线性转换:
filterAngle = photoshopAngle * π / 180
还需要补充的是,给定的
inputAngle
不是最终的色调角度值,而是颜色立方体旋转的角度。也就是说,如果初始色调为20
,并且输入值角度10
,则生成的色调值将为30
,而不是10
。