1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Babygimp Manual - Importing and Exporting</title>
</head>
<body bgcolor="#FFFFFF" lang="en">
<p><a href="palettes.html">Next </a> <a href="introduction.html">Previous
</a> <a href="index.html">Table of Contents</a></p>
<hr>
<h1>Importing and Exporting</h1>
<h2>Overview</h2>
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 <a
href="plugins.html">plugin</a> mechanism which had to be used in previous
versions). The editor for exporters/importers may be invoked from the file
menu.
<p>Note, that importing may result in some information loss if you import
image formats with an alpha channel (like png).</p>
<p>Babygimp recognizes image formats by file name extensions. So each
exporter/importer consists of a filename extension and a shell command.</p>
<ul>
<li>The extension determines which exporter/importer will be applied when
loading or saving an image.
<p>``*'' matches all extensions. If you have created an importer/exporter
for ``*'' and also for a specific extensions, then the specific
importer/exporter will apply for this file type.</p>
</li>
<li>The shell command must read from standard input and write to standard
output.<br>
Exporters are expected to read xpm. The standard output of the exporter
is written to the image file.
<p>Importers are fead with the (non xpm) image which you want to load.
They are expected to write an xpm image to the standard output which will
then be loaded by Babygimp.</p>
</li>
</ul>
<p>The importers and exporters are stored in the $HOME/.babygimp/importers
and $HOME/.babygimp/exporters.</p>
<h2>Examples</h2>
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:-''. <br>
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.
<p>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''.</p>
<h2>The File Browser</h2>
<p>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.</p>
<h2>Invoking Babygimp from an Image Browser</h2>
<p>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).</p>
<p>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 <a href="internals.html">internals</a> 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. <br>
</p>
<hr>
<p><a href="palettes.html">Next</a> <a href="introduction.html">Previous</a>
<a href="index.html">Table of Contents</a></p>
</body>
</html>
|