Next Previous Table of Contents


Importing and Exporting

Overview

Babygimps native image format is xpm. Reading or saving other image formats is done by using external programs (such as ppmtoxpm from the netpbm package or convert from ImageMagick). In order to use these programs through Babygimp you have to create exporters and importers (this is quite similar to the plugin mechanism which had to be used in previous versions). The editor for exporters/importers may be invoked from the file menu.

Note, that importing may result in some information loss if you import image formats with an alpha channel (like png).

Babygimp recognizes image formats by file name extensions. So each exporter/importer consists of a filename extension and a shell command.

The importers and exporters are stored in the $HOME/.babygimp/importers and $HOME/.babygimp/exporters.

Examples

If you have ImageMagick on your system, then it will be sufficient to have only one exporter (extension ``*''). The corresponding shell command might be ``convert - xpm:-''.
If you have only netpbm, you could use ``anytopnm | ppmtoxpm'' (also for extension ``*''), but this is less powerfull and may fail on some image formats. It also will destroy transparency.

For exporters you will have to specify detailed extensions, since the exporter must be told to which format to create. If you have ImageMagick, you could use e.g. ``convert - gif:-'' for the extension ''GIF''.

The File Browser

Since version 0.3 the Babygimp has a much improved file browser. The main improvements are bookmark support (should be obvious) and support for file name masks. This means that may specify which files are shown in the file list by speicfying space separated shell wildcharts (e.q. ``*.xpm *.gif'') in the file mask entry field.

Invoking Babygimp from an Image Browser

Since Babygimps builtin file browser has no preview function it is convenient to call Babygimp from an image browser like xbmbrowser or a file manager which can display image thumbnails (i prefer rox).

But when one wants to combine images, it would be inconvenient to create a new instance of Babygimp each time it is invoked. Therefore, when Babygimp is invoked a second time (with a file argument), instead of creating a new innstance the second file will be loaded to the clipboard of the already running instance. (See the internals section for the terrible hack i used). So the menu function ``load file to clipboard'' will only rarely be used. Instead, just create an appropriate .kdelnk file, xbmbrowserrc entry or whatever and you may load images to the Babygimp clipboard by clicking on your favourite image browser. I highly recommend the Rox filer for browsing images.


Next Previous Table of Contents