This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

hh

By: a guest on Dec 1st, 2012  |  syntax: Objective C  |  size: 1.36 KB  |  views: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. -(void)ReDraw{
  2.     imgPRE = imgORG;
  3.     for (int i = 0; i<[Parameter_Name count]; i++) {
  4.         imgPRE =  [self ifFilter:[Parameter_Name objectAtIndex:i] Value:[[Parameter_Value objectAtIndex:i]floatValue] Input:imgPRE];
  5.     }
  6.     [self performSelectorOnMainThread:@selector(UpdateView) withObject:nil waitUntilDone:NO];
  7. }
  8.  
  9. -(void)UpdateView{
  10.     imgV.image = imgPRE;
  11. }
  12.  
  13.  
  14. -(UIImage*)ifFilter:(NSString*)Name Value:(float)Value Input:(UIImage*)Input{
  15.     if (Name == @"filter") {
  16.        
  17.         Input = [self FiltersSwitch:Value Input:Input];
  18.         return Input;
  19.     }
  20.     else if (Name == @"gaussian") {
  21.         Input = [filters GausianBlurFilter:Input Amount: Value];
  22.         return Input;
  23.     }
  24.     else if (Name == @"hue"){
  25.         Input =  [filters HueFilter:Input inputAngle: Value];
  26.         return Input;
  27.     }
  28.     else if (Name == @"exposure"){
  29.         Input =  [filters ExposureFilter:Input inputEV: Value];
  30.         return Input;
  31.     }
  32.     else if (Name == @"saturation"){
  33.         Input =  [filters Saturation:Input Saturation:Value];
  34.         return Input;
  35.     }
  36.     else if (Name == @"contrast"){
  37.         Input =  [filters Contrast:Input Contrast:Value];
  38.         return Input;
  39.     }
  40.     else if (Name == @"brightness"){
  41.         Input =  [filters Brightness:Input Brightness:Value];
  42.         return Input;
  43.     }
  44.     return Input;
  45. }
clone this paste RAW Paste Data