Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)ReDraw{
- imgPRE = imgORG;
- for (int i = 0; i<[Parameter_Name count]; i++) {
- imgPRE = [self ifFilter:[Parameter_Name objectAtIndex:i] Value:[[Parameter_Value objectAtIndex:i]floatValue] Input:imgPRE];
- }
- [self performSelectorOnMainThread:@selector(UpdateView) withObject:nil waitUntilDone:NO];
- }
- -(void)UpdateView{
- imgV.image = imgPRE;
- }
- -(UIImage*)ifFilter:(NSString*)Name Value:(float)Value Input:(UIImage*)Input{
- if (Name == @"filter") {
- Input = [self FiltersSwitch:Value Input:Input];
- return Input;
- }
- else if (Name == @"gaussian") {
- Input = [filters GausianBlurFilter:Input Amount: Value];
- return Input;
- }
- else if (Name == @"hue"){
- Input = [filters HueFilter:Input inputAngle: Value];
- return Input;
- }
- else if (Name == @"exposure"){
- Input = [filters ExposureFilter:Input inputEV: Value];
- return Input;
- }
- else if (Name == @"saturation"){
- Input = [filters Saturation:Input Saturation:Value];
- return Input;
- }
- else if (Name == @"contrast"){
- Input = [filters Contrast:Input Contrast:Value];
- return Input;
- }
- else if (Name == @"brightness"){
- Input = [filters Brightness:Input Brightness:Value];
- return Input;
- }
- return Input;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement