maybe its a sacrilege, but I'm trying to make plugins compatible to other host. Are there any general rules for this?
I hve serveral quesition:
1. how can I detect which host loaded my plugin?
2. how can I detect it colorservice are really implemented (on XnView the pointer is not NULL, the function call worked, but no conversion was performed...
3. even XnView has a problem with advanceState(). During real filtering it works perfectly. But for getting preview image (in filterstart to) it crashes. I suspect after trying it with a debugger that the size may be an issue. But I cannot detect any rules. I know it works with inRect and outrect 200x200. Any ideas?
All of these questions are host-specific. You either need to communicate with the developers of the host application you're testing against, or do your own reverse engineering of their API behaviour. :)
All I know is that in my own plugins, I've never done anything host-specific but always coded to the PS API as documented, and let the cards fall as they may. Ultimately it's the host's responsibility to emulate Photoshop and they will do that with varying degrees of fidelity. Anything you do beyond that, is your own cost/benefit tradeoff.
This won't work for Irfanview as it will return either == 0, so I believe the best thing to do is to set tileWidth and tileHeight to some number (e.g. 256?). (Photoshop seems to send tileWidth=256 and tileHeight=272 on my system, dunno why.)
GIMP: Do any filters work correctly in GIMP? I've tried... my own
free plugins, Telegraphics Filter Foundry, the CS3 SDK Dissolve example, and the two plugins that come with Irfanview's 8bf thing.
The preview seems entirely screwed up, though the plugin will render (except for Filter Foundry, which won't load). Anybody know what the fix is?
Photoline: Suites like SProperties is not supported. Before calling functions in that, check that the suite pointer is not NULL.
GIMP: The PSPI plugin does not handle per-plane/non-interleaved data for preview due to a bug (or lack of feature) in the code. Since it's open source I'll probably try to update the PSPI code.