jameswomack / iOS-Image-Filters

High-level CIImage-based image filtering on iOS 6+ using CoreImage & raster graphic overlays
http://womack.io
MIT License
132 stars 27 forks source link

CIColorControls is not key value coding-compliant for the key inputConstrast... #8

Closed jenshandersson closed 9 years ago

jenshandersson commented 9 years ago

UPDATE: "inputConstrast" is misspelled and that's why!

I'm getting this crash when trying to apply filters, maybe I'm doing it wrong...?

My code:

UIImage *i = [self.originalImage crossProcess];
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<CIColorControls 0x7ff7f5048ef0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key inputConstrast.'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010b071f35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010ad0abb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010b071b79 -[NSException raise] + 9
    3   CoreImage                           0x0000000107ca3915 -[CIFilter setValue:forUndefinedKey:] + 137
    4   Foundation                          0x00000001082df7b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
    5   TheWeek                             0x00000001066f8b8f __29-[ImageFilter filter:params:]_block_invoke + 143
    6   CoreFoundation                      0x000000010afe6b25 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
    7   CoreFoundation                      0x000000010afe6a3c -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 236
    8   TheWeek                             0x00000001066f881a -[ImageFilter filter:params:] + 762
    9   CoreFoundation                      0x000000010af69c8c __invoking___ + 140
    10  CoreFoundation                      0x000000010af69ae2 -[NSInvocation invoke] + 290
    11  CoreFoundation                      0x000000010aff8ed6 -[NSInvocation invokeWithTarget:] + 54
    12  TheWeek                             0x00000001066f32b7 -[UIImage(ImageFilter) forwardInvocation:] + 119
    13  CoreFoundation                      0x000000010afd108f ___forwarding___ + 495
    14  CoreFoundation                      0x000000010afd0e18 _CF_forwarding_prep_0 + 120
    15  TheWeek                             0x00000001066f6dd0 -[ImageFilter crossProcess] + 352
    16  CoreFoundation                      0x000000010af69c8c __invoking___ + 140
    17  CoreFoundation                      0x000000010af69ae2 -[NSInvocation invoke] + 290
    18  CoreFoundation                      0x000000010aff8ed6 -[NSInvocation invokeWithTarget:] + 54
    19  TheWeek                             0x00000001066f32b7 -[UIImage(ImageFilter) forwardInvocation:] + 119
    20  CoreFoundation                      0x000000010afd108f ___forwarding___ + 495
    21  CoreFoundation                      0x000000010afd0e18 _CF_forwarding_prep_0 + 120
    22  TheWeek                             0x00000001065cb1c9 -[RSKImageCropViewController addFilter] + 121
    23  UIKit                               0x00000001090238be -[UIApplication sendAction:to:from:forEvent:] + 75
    24  UIKit                               0x000000010912a410 -[UIControl _sendActionsForEvents:withEvent:] + 467
    25  UIKit                               0x00000001091297df -[UIControl touchesEnded:withEvent:] + 522
    26  UIKit                               0x0000000109069308 -[UIWindow _sendTouchesForEvent:] + 735
    27  UIKit                               0x0000000109069c33 -[UIWindow sendEvent:] + 683
    28  UIKit                               0x00000001090369b1 -[UIApplication sendEvent:] + 246
    29  UIKit                               0x0000000109043a7d _UIApplicationHandleEventFromQueueEvent + 17370
    30  UIKit                               0x000000010901f103 _UIApplicationHandleEventQueue + 1961
    31  CoreFoundation                      0x000000010afa7551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    32  CoreFoundation                      0x000000010af9d41d __CFRunLoopDoSources0 + 269
    33  CoreFoundation                      0x000000010af9ca54 __CFRunLoopRun + 868
    34  CoreFoundation                      0x000000010af9c486 CFRunLoopRunSpecific + 470
    35  GraphicsServices                    0x000000010ce219f0 GSEventRunModal + 161
    36  UIKit                               0x0000000109022420 UIApplicationMain + 1282
    37  TheWeek                             0x000000010660df83 main + 115
    38  libdyld.dylib                       0x000000010b8c2145 start + 1
    39  ???                                 0x0000000000000001 0x0 + 1
jameswomack commented 9 years ago

@jenshandersson

I've corrected the spelling an push a new version of the code to CocoaPods as well as this repo.