Short question: If I have two graphics toolkits enabled (that perform the same functions) how do I know which will be used?
Long version: I'm developing a Graphics Toolkit to utilise Mac OS X's CoreImage functionality. At the moment I'd just like to get the basics working (crop and resize). After testing it on my local system, I want to enable it on a low traffic Gallery just to make sure everything is working fine before continuing. But since everything isn't finished I'll want ImageMagick still enabled, but how do I make sure it uses my plugin for what it can do and only uses ImageMagick when it can't?
Posts: 4338
When you register the toolkit plugin in the factory there's an (optional) priority, $orderWeight. When Gallery looks in the factory for a toolkit to handle your mime-type it picks the compatible one with the lowest weight.
http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html#methodregisterFactoryImplementation
Posts: 2
Ah! Thanks very much. You saved me hours of head scratching. (The Gallery codebase is still very new to me, so I don't know where to find things)
Posts: 4338
Actually it might be this one that's more signifcant for individual operations, priority-wise:
http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html#methodregisterToolkitOperation