Skip to topic | Skip to bottom
Home
Lars
Lars.NotesOnMakingKipiPluginsr1.1 - 30 Jan 2007 - 09:04 - TWikiGuesttopic end

Start of topic | Skip to actions

Making KIPI plugins

So I'm going to create a plugin for my photo organizing program, KPhotoAlbum?. This pugin will allow me to experiment with various ways of measuring relative sharpness of an image, in order to automatically find the sharpest of a series of images of the same subject (similar to what my old Coolpix 955 did, called "Best Shot Selector"). It's a way to fake image stabilization -- any time you take a series of handheld pictures right after each other, some will be more shaken than others, and some might even be acceptably still. Great for when you can't use a tripod for one reason or the other. But I digress. Here will be the notes of my journey.

Step one: Compiling Hello, World

According to [[http://developer.kde.org/documentation/library/3.5-api/extragear-libs-apidocs/libkipi/html/][the libkipi tutorials], the easy starting point is existing source, namely the Hello, World KIPI plugin.

I downloaded these pieces into the Plugins subdirectory of the KPhotoAlbum? SVN tree, in a separate directory called Histogram.

After that, I modified the Makefile.am in the Plugins directory, adding SUBDIRS = Histogram.

Then I added kphotoalbum/Plugins/Histogram/Makefile to the top-level configure.in in the AC_CONFIG_FILES section.

I then ran autoreconf to get the new Makefile.am ready. A bunch of warnings were issued, but none that looked critical or pertaining to me.

Next up was ./configure. The Makefile got generated, so that's good.

Now on to compiling. At this point, it occurs to me that I should have compiled before adding my own stuff -- some other code is broken. Out to do svn up, autoreconf, ./configure and then make again.

Trying to get around that, I go into the Plugins directory and make. Complains about missing .moc file. Use moc plugin_helloworld.h > plugin_helloworld.moc to generate it.

Do make again and it compiles! Now time to try a make distclean && ./configure && make on the whole thing to try to get around the other compile failure. Actually, right thing is make distclean && ./configure && cd kphotoalbum && make since some of the other things break for reasons I don't care about. No luck with that, though.

The right thing to do is make -f Makefile.cvs before ./configure && cd kphotoalbum && make. This makes it compile, and my little plugin with it.

Starting up KPhotoAlbum? (which is fast now!) shows... no plugin! Should have been in misc under the Plugins, but nothing. Adding a printf() call shows it's not initialized, even when I do a make install (which does install it).

-- LarsClausen - 28 Jan 2007
to top


You are here: Lars > HomePage > MineFotografier > EditingSoftware > NotesOnMakingKipiPlugins

to top

Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback