Hi, On Wed, 2009-08-12 at 15:56 +0300, Sampo Vuori wrote: > Thanks devs and other contributors for the great raw developer for > linux! I have been thinking of making my own raw developer but now > that I see rawstudio approaching very much usable state I guess I > should try help pushing it forward instead.
You're very welcome! But if you would like to have your filter included in mainline Rawstudio, be prepared for some discussion ;-) Please make sure that you are using newest Rawstudio from subversion. The filter code is currently being developed and is subject to change at any time. First of, an introduction to the various types involved: RSPlugin: Basic plugin class, takes care of loading and unloading plugin code. RSFilter: Filter class, defines what a filter (not a plugin!) must implement and do. RSFilterParam: Gives _SOME_ parameters to filters. RSFilterResponse: Filters use this for sending response data to the next filter in the chain. Some sources to study if you plan on developing an image filter: librawstudio/rs-plugin-manager.c librawstudio/rs-filter.c librawstudio/rs-filter-param.c librawstudio/rs-filter-response.c If you have graphviz installed, you can try "Debug" -> "Filter Graph" for an overview of the current filter chain. If you look at the console when starting Rawstudio, you can currently see some debug information about loaded plugins. > I'd like to try writing a plugin for rawstudio (B&W for starters). Is > there any documentation of the plugin interface? Shipping a sample > plugin with the sources could help a lot too I think (I love examples > :-) I guess I'd need info about The documentation for writing plugins for Rawstudio is non-existent at the moment. Currently there is an outdated template in contrib/. Hopefully someone will get around to update it at some point :) Try to get a look at some of the filters currently implemented, it's the best documentation we have right now. plugins/rotate/rotate.c is quite simple. > 1) how the data moves between plugin and the program? Well. For the most part it doesn't. It mostly moves from filter to filter. The application can use rs_filter_get_image() (and a handful of other functions) to extract data from the last filter. g_object_set() is used for setting processing parameters for most filters. > 2) how do I register a plugin so the program knows it's there It's quite simple. Just install it ;) Rawstudio will search the plugin path for any plugins. For an example of an plugin that build out-of-tree take a look at RawSpeed. If you develop your plugin in-tree, just add it to the relevant Makefile.am's and configure.in. "./contrib/new_filter.sh RS_FILTER_NAME RSFilterName rs_filter_name" will create a (outdated) template for you to build on, and tell you which files you need to modify. > 3) how do I specify how the plugin shows up in the GUI? Currently plugins have no way of altering the GUI. > 4) what interface should it implement? (which functions need to be > implemented) You should try to take a look at some of the current filters. plugins/rotate/rotate.c is quite simple. > BTW. The idea of being able to specify the processing flow (what image > processors affect the image and in which order) is *great* Please note that this is only for the programmer - not for the end user. And probably never will be. /Anders Brander _______________________________________________ Rawstudio-dev mailing list [email protected] http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
