Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why doesn't CIFilter +filterWithName:keysAndValues: invoke -setDefaults?



Why doesn't CIFilter +filterWithName:keysAndValues: invoke -setDefaults?

To use +filterWithName:keysAndValues:, I have to be careful to include certain "required" keys before I chain the filters, or I get runtime errors like:

An uncaught exception was raised
CIUnsharpMask: sharpen: nil value for argument #2 (scale)
*** Uncaught exception: <CIKernelNilArgument> CIUnsharpMask: sharpen: nil value for argument #2 (scale)
Program has exited due to signal 5 (SIGTRAP).


In this case, the CIUnsharpMask filter requires "inputImage" and "inputIntensity" but not "inputRadius" (I can leave it out). Who is to know? There are many like this. How can I know which keys are required?

If CIFilter +filterWithName:keysAndValues: can invoke -setDefaults, then it is much easier to set up a chain of filters, since I only need to use this one method, and I don't need to supply values for all of the keys at this point.

Roland

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.