Archive for April, 2011

Vintage effect Script-Fu for GIMP

Any self-respected hipster photographer must provide his share of vintage photos with helvetica captions. In order to make life easier for people using the Greatest Image Manipulation Programâ„¢ I have made a script which does the hard part.

The provided script is based on this tutorial.

Download the script and put it into your ${HOME}/.gimp/scripts folder (or its equivalent on your system).

Download the Vintage Color script for GIMP

Some demos

Changelog

version 1.1

  • put the whole script into an undo group
  • replaced deprecated functions by newer ones – operating on items

version 1.0

  • initial release

Using QtCreator for OpenViBE development

If you ever wanted to develop a box, or perhaps a new driver for OpenViBE, you have had to ask you the question “Which editor or IDE should I use?”. As there is no “official” editor supported by OpenViBE (indeed, here at Inria we all use different environments)  you can use anything you want. On Windows you probably want to use Visual Studio so you can access to completion, however it gets tricky when you want to compile OpenViBE and access quickly to the compiling output including errors and warning directly from the IDE. On Linux you can choose your camp and use either Vim or Emacs (or another from a multitude of great editors) however you will spend a moment trying to figure out how to get code completion.

Introducing QtCreator

Fear not, because there is a great lightweight IDE which can be configured very quickly and works like a charm with OpenViBE. It is called QtCreator, it is free and it can be downloaded right here. Although OpenViBE uses Gtk and QtCreator is mainly focused on Qt applications, its has the possibility of importing any project and work with it.

Once you have OpenViBE (from sources) and Qt Created installed you can simply create new project by going to the menu and selecting File->New File or Project->Other Project->Import Existing Project. In the dialog box just name your project OpenViBE and choose the path where you have installed OpenViBE.

Obtaining full auto-completion

This however, will create a project containing ALL files in the OpenViBE folder, which is not what you want. In order to clean up the project a bit I have made a script which creates the appropriate files.

Follow the link to download it for your platform (currently only available for Linux) and put it into your OpenViBE folder. Run the script from command line, it will re-configure the project to contain the right dependencies and files. By default, it will not include the branches, if you want to work with branches you can specify their names in the BRANCHES variable declared at the beginning of the script. Re-open the project in QtCreator to update the file lists.

You now have a full-featured completion for OpenViBE methods as well as for all of its dependencies. If you do not wish to have some projects in the list you can use the IGNORE variable. This is useful when you do not want to have the trunk of a project open at the same time as a branch you are working on.

In order to get the syntax coloration right we’ll have to define some basic declarations in the OpenViBE.config file. Depending on your platform these might change a bit, just copy-paste the right code into the file.

For Linux :

// ADD PREDEFINED MACROS HERE!
#define TARGET_HAS_ThirdPartyOpenAL
#define TARGET_HAS_ThirdPartyOgre
#define TARGET_HAS_ThirdPartyLua
#define TARGET_OS_Linux

For Windows :

// ADD PREDEFINED MACROS HERE!
#define TARGET_HAS_ThirdPartyOpenAL
#define TARGET_HAS_ThirdPartyOgre
#define TARGET_HAS_ThirdPartyLua
#define TARGET_OS_Windows

Compile OpenViBE directly from the IDE

To take the integration a bit further, you can tell QtCreator to use a script instead of a default build-chain (such as make or cmake). To do this, open your project and go to the Projects tab and then to Build Settings.

Remove the default build step and add a custom one. In the Command option insert the path to the scripts/linux-build script in OpenViBE. Don’t forget to check the Enable custom process step checkbox.

In the Build Environment settings check the Clear system environment checkbox and add a new variable BUILDDIR which you must point to your scripts folder in OpenViBE.

In the end it should look something like this :

QtCreator OpenViBE Build Environment

This is how the Build Settings should look like. Parts to modify are highlighted in yellow.

Congratulations, you can now compile OpenViBE simply by pressing ctrl+shift+b.

And it gets even better

Along with simpler compilation and code completion comes a ton of neat features which we developers like.

  • Possibility to jump directly to errors occurred during the compilation
  • A very fast way to access any OpenViBE class or file
  • Bookmarks
  • Semantic highlighting
QtCreator Features

A preview of fQtCreator used for OpenViBE development

Switching to WordPress

Hello everyone.

So, I’ve decided to use WordPress (yet again). Since I now have a job and quite a lot of things to write about it will be better this way. Comments will be now handled exclusively by Facebook, even though I would really like a better API than the iframe horror. A new theme is underway, so the steampunk atmosphere should replace the sterile white soon.

Also, older articles will come back of course. Sadly permalinks will die but that’s the way it is. Oh and, more recipes are coming as well.

Until we meet again my friend …