This mailing-list thread states that there is a QuartzFilter class in the Mac OS X SDKs that can be used manipulate, well, Quartz filters. But… this class is undocumented as far as I can tell, and I couldn’t find any more information on it with Google.
A quick use of nm reveals that the QuartzFilter.framework has the following public methods:
000000000001577a t +[QuartzFilter converterProperties:allObjects:images:imageBPC:imageRenderingIntent:]
0000000000015364 t +[QuartzFilter hostMatchingFilter:imageBPC:imageRenderingIntent:]
00000000000152a5 t +[QuartzFilter imageConverter:bpc:renderingIntent:]
0000000000015465 t +[QuartzFilter quartzFilterWithOutputIntents:]
00000000000155df t +[QuartzFilter quartzFilterWithProperties:]
0000000000015522 t +[QuartzFilter quartzFilterWithURL:]
but, all these create filter objects, how do you apply them to something?
You’re right, these classes are very poorly documented. In fact, there seems to be virtually no documentation at all, even in the headers.
You don’t need to use
nmto see the API. Use File > Open Quickly in Xcode and typeQuartzFilterinto the dialog. You’ll be able to openQuartzFilter.handQuartzFilterManager.h.Looks like you could use this to get an array of all available filters:
Once you have a filter, you can apply it to a
CGContextwith-applyToContext:.You can create filters in the ColorSync utility, but how you go about creating one programmatically is a mystery. I guess if you instantiate one of the existing filters using its URL then you could use the various methods of
QuartzFilterto investigate.