How to develop and deploy plugins?
Sebastian Wahl
spillerrec at gmail.com
Wed Apr 5 06:13:06 UTC 2017
Hi Boudewijn,
Sorry for the late reply
> If probably would be enough to add the flif mimetype to the bmp plugin,
> the bmp plugis is by now quite deceptively named: it's a basic let's-
> reuse-qimageio plugin.
Yeah that is what I did to test it, but if I wanted to redistribute it
as a third-party plugin I wouldn't be able to modify an existing
plugin.
> The metadata system actually already had a priority system, but that never
> really worked out.
How did it fail? I don't think such a piority system is trivial to
design well, so any experiences would be useful.
> I think the best plan would be to start with a simple refactoring that allows
> plugins to add wildcards to their static metadata: that automatically
> means a lower priority. Then we can add a simple getter that gets all the
> actual mimetypes from the plugin, and the plugin can get it from its own
> resources. That wouldn't be a lot of work, and would make Krita use
> your plugin if it's present.
While that would be great, but I'm not sure if that is the best way to do it.
If we just want to lower the priority of additional formats, we don't
need the wildcard. We could just compare the static metadata to what
the plugin returns, and use a lower priority for those not hardcoded
into the plugin. High and low priority is easily implemented by using
set operations, instead of having to query for the wildcard, remove
it, and then compare it.
If we want to be able to expand to a more detailed priority system
later I think we should put a little more thought into it so that we
move in the right direction.
Since this would mean support for more than just FLIF I wouldn't mind
putting in a bit work to make it happen, if nobody which is already
into the source is interested in doing it. I have a few Qt plugins for
custom formats and propetary formats (which I can't distribute), so
being able to load them without having to convert them would be nice.
Some pointers to which classes are relevant to loading/saving would be
appreciated though.
Best Regards,
Sebastian Wahl
More information about the kimageshop
mailing list