Imported Upstream version 2.3.13

This commit is contained in:
Ari Pollak
2010-08-11 01:20:31 -04:00
parent a028e0b309
commit bbd6d9844c
1225 changed files with 162390 additions and 93699 deletions

View File

@ -18,10 +18,10 @@
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
<link rel="part" href="libgimpui.html" title="Part&#160;III.&#160;GIMP User Interface Library">
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of new symbols in GIMP 2.2">
<link rel="index" href="ix03.html" title="Index of new symbols in GIMP 2.4">
<link rel="index" href="ix04.html" title="Index of deprecated symbols">
<link rel="index" href="libgimp-index.html" title="Index">
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
@ -32,16 +32,16 @@
<th width="100%" align="center">GIMP Library Reference Manual</th>
<td><a accesskey="n" href="libgimp-gimpfloatingsel.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2581234" class="shortcut">Top</a>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2585106" class="shortcut">Top</a>
&#160;|&#160;
<a href="#id2615726" class="shortcut">Description</a></nobr></td></tr>
<a href="#id2611280" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="libgimp-gimpfileops"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2581234"></a><span class="refentrytitle">gimpfileops</span>
<a name="id2585106"></a><span class="refentrytitle">gimpfileops</span>
</h2>
<p>gimpfileops &#8212; File operations (load, save, etc.)</p>
</td>
@ -64,6 +64,12 @@ href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
gint32 image_ID,
const gchar *filename);
gint* <a href="libgimp-gimpfileops.html#gimp-file-load-layers">gimp_file_load_layers</a> (<a
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
gint32 image_ID,
const gchar *filename,
gint *num_layers);
gboolean <a href="libgimp-gimpfileops.html#gimp-file-save">gimp_file_save</a> (<a
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
@ -71,6 +77,8 @@ href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
gint32 drawable_ID,
const gchar *filename,
const gchar *raw_filename);
gboolean <a href="libgimp-gimpfileops.html#gimp-file-save-thumbnail">gimp_file_save_thumbnail</a> (gint32 image_ID,
const gchar *filename);
gboolean <a href="libgimp-gimpfileops.html#gimp-register-magic-load-handler">gimp_register_magic_load_handler</a>
(const gchar *procedure_name,
const gchar *extensions,
@ -89,18 +97,18 @@ gboolean <a href="libgimp-gimpfileops.html#gimp-register-thumbnail-loader">gi
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2615726"></a><h2>Description</h2>
<a name="id2611280"></a><h2>Description</h2>
<p>
File operations (load, save, etc.)
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2615741"></a><h2>Details</h2>
<a name="id2611295"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2615752"></a><h3>
<a name="id2611306"></a><h3>
<a name="gimp-temp-name"></a>gimp_temp_name ()</h3>
<a class="indexterm" name="id2615765"></a><pre class="programlisting">gchar* gimp_temp_name (const gchar *extension);</pre>
<a class="indexterm" name="id2611318"></a><pre class="programlisting">gchar* gimp_temp_name (const gchar *extension);</pre>
<p>
Generates a unique filename.
</p>
@ -114,14 +122,12 @@ user's gimprc.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>extension</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>extension</code></em>&#160;:</span></td>
<td> The extension the file will have.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The new temp filename.
</td>
</tr>
@ -130,9 +136,9 @@ user's gimprc.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2612636"></a><h3>
<a name="id2612502"></a><h3>
<a name="gimp-file-load"></a>gimp_file_load ()</h3>
<a class="indexterm" name="id2612649"></a><pre class="programlisting">gint32 gimp_file_load (<a
<a class="indexterm" name="id2612514"></a><pre class="programlisting">gint32 gimp_file_load (<a
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
const gchar *filename,
@ -155,26 +161,22 @@ will not look like a URL.\"</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td> The run mode.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> The name of the file to load.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>raw_filename</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>raw_filename</code></em>&#160;:</span></td>
<td> The name as entered by the user.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The output image.
</td>
</tr>
@ -183,19 +185,20 @@ will not look like a URL.\"</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2612762"></a><h3>
<a name="id2612627"></a><h3>
<a name="gimp-file-load-layer"></a>gimp_file_load_layer ()</h3>
<a class="indexterm" name="id2613142"></a><pre class="programlisting">gint32 gimp_file_load_layer (<a
<a class="indexterm" name="id2612641"></a><pre class="programlisting">gint32 gimp_file_load_layer (<a
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
gint32 image_ID,
const gchar *filename);</pre>
<p>
Loads an image file as a layer into an already opened image.
Loads an image file as a layer for an existing image.
</p>
<p>
This procedure behaves like the file-load procedure but opens the
specified image as a layer into an already opened image.</p>
specified image as a layer for an existing image. The returned layer
needs to be added to the existing image with <a href="libgimp-gimpimage.html#gimp-image-add-layer"><code class="function">gimp_image_add_layer()</code></a>.</p>
<p>
</p>
@ -203,26 +206,22 @@ specified image as a layer into an already opened image.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td> The run mode.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>image_ID</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>image_ID</code></em>&#160;:</span></td>
<td> Destination image.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> The name of the file to load.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The layer created when loading the image file.
</td>
@ -234,9 +233,63 @@ specified image as a layer into an already opened image.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2613255"></a><h3>
<a name="id2622578"></a><h3>
<a name="gimp-file-load-layers"></a>gimp_file_load_layers ()</h3>
<a class="indexterm" name="id2622591"></a><pre class="programlisting">gint* gimp_file_load_layers (<a
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
gint32 image_ID,
const gchar *filename,
gint *num_layers);</pre>
<p>
Loads an image file as layers for an existing image.
</p>
<p>
This procedure behaves like the file-load procedure but opens the
specified image as layers for an existing image. The returned layers
needs to be added to the existing image with <a href="libgimp-gimpimage.html#gimp-image-add-layer"><code class="function">gimp_image_add_layer()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td> The run mode.
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>image_ID</code></em>&#160;:</span></td>
<td> Destination image.
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> The name of the file to load.
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>num_layers</code></em>&#160;:</span></td>
<td> The number of loaded layers.
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The list of loaded layers.
</td>
</tr>
</tbody>
</table></div>
<p>Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2622734"></a><h3>
<a name="gimp-file-save"></a>gimp_file_save ()</h3>
<a class="indexterm" name="id2613268"></a><pre class="programlisting">gboolean gimp_file_save (<a
<a class="indexterm" name="id2622746"></a><pre class="programlisting">gboolean gimp_file_save (<a
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpRunMode"
>GimpRunMode</a> run_mode,
gint32 image_ID,
@ -260,38 +313,32 @@ fetch a URL, and the full pathname will not look like a URL.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>run_mode</code></em>&#160;:</span></td>
<td> The run mode.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>image_ID</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>image_ID</code></em>&#160;:</span></td>
<td> Input image.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable_ID</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>drawable_ID</code></em>&#160;:</span></td>
<td> Drawable to save.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> The name of the file to save the image in.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>raw_filename</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>raw_filename</code></em>&#160;:</span></td>
<td> The name as entered by the user.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
@ -300,9 +347,49 @@ fetch a URL, and the full pathname will not look like a URL.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2613722"></a><h3>
<a name="id2614763"></a><h3>
<a name="gimp-file-save-thumbnail"></a>gimp_file_save_thumbnail ()</h3>
<a class="indexterm" name="id2614774"></a><pre class="programlisting">gboolean gimp_file_save_thumbnail (gint32 image_ID,
const gchar *filename);</pre>
<p>
Saves a thumbnail for the given image
</p>
<p>
This procedure saves a thumbnail for the given image according to
the Free Desktop Thumbnail Managing Standard. The thumbnail is saved
so that it belongs to the file with the given filename. This means
you have to save the image under this name first, otherwise this
procedure will fail. This procedure may become useful if you want to
explicitely save a thumbnail with a file.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>image_ID</code></em>&#160;:</span></td>
<td> The image.
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> The name of the file the thumbnail belongs to.
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2614865"></a><h3>
<a name="gimp-register-magic-load-handler"></a>gimp_register_magic_load_handler ()</h3>
<a class="indexterm" name="id2613733"></a><pre class="programlisting">gboolean gimp_register_magic_load_handler
<a class="indexterm" name="id2614878"></a><pre class="programlisting">gboolean gimp_register_magic_load_handler
(const gchar *procedure_name,
const gchar *extensions,
const gchar *prefixes,
@ -320,32 +407,27 @@ of a particular file format using magic file information.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td> The name of the procedure to be used for loading.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>extensions</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>extensions</code></em>&#160;:</span></td>
<td> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prefixes</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>prefixes</code></em>&#160;:</span></td>
<td> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>magics</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>magics</code></em>&#160;:</span></td>
<td> comma separated list of magic file information this handler can load (i.e. \"0,string,GIF\").
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
@ -354,9 +436,9 @@ of a particular file format using magic file information.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2613867"></a><h3>
<a name="id2615014"></a><h3>
<a name="gimp-register-load-handler"></a>gimp_register_load_handler ()</h3>
<a class="indexterm" name="id2613879"></a><pre class="programlisting">gboolean gimp_register_load_handler (const gchar *procedure_name,
<a class="indexterm" name="id2615025"></a><pre class="programlisting">gboolean gimp_register_load_handler (const gchar *procedure_name,
const gchar *extensions,
const gchar *prefixes);</pre>
<p>
@ -372,26 +454,22 @@ of a particular file format.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td> The name of the procedure to be used for loading.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>extensions</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>extensions</code></em>&#160;:</span></td>
<td> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prefixes</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>prefixes</code></em>&#160;:</span></td>
<td> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
@ -400,9 +478,9 @@ of a particular file format.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2613989"></a><h3>
<a name="id2615135"></a><h3>
<a name="gimp-register-save-handler"></a>gimp_register_save_handler ()</h3>
<a class="indexterm" name="id2614001"></a><pre class="programlisting">gboolean gimp_register_save_handler (const gchar *procedure_name,
<a class="indexterm" name="id2615147"></a><pre class="programlisting">gboolean gimp_register_save_handler (const gchar *procedure_name,
const gchar *extensions,
const gchar *prefixes);</pre>
<p>
@ -418,26 +496,22 @@ in a particular file format.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td> The name of the procedure to be used for saving.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>extensions</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>extensions</code></em>&#160;:</span></td>
<td> comma separated list of extensions this handler can save (i.e. \"jpg,jpeg\").
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prefixes</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>prefixes</code></em>&#160;:</span></td>
<td> comma separated list of prefixes this handler can save (i.e. \"http:,ftp:\").
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
@ -446,9 +520,9 @@ in a particular file format.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2614111"></a><h3>
<a name="id2615257"></a><h3>
<a name="gimp-register-file-handler-mime"></a>gimp_register_file_handler_mime ()</h3>
<a class="indexterm" name="id2614127"></a><pre class="programlisting">gboolean gimp_register_file_handler_mime (const gchar *procedure_name,
<a class="indexterm" name="id2615273"></a><pre class="programlisting">gboolean gimp_register_file_handler_mime (const gchar *procedure_name,
const gchar *mime_type);</pre>
<p>
Associates a MIME type with a file handler procedure.
@ -464,20 +538,17 @@ procedure.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>procedure_name</code></em>&#160;:</span></td>
<td> The name of the procedure to associate a MIME type with.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mime_type</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>mime_type</code></em>&#160;:</span></td>
<td> A single MIME type, like for example \"image/jpeg\".
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
@ -489,9 +560,9 @@ procedure.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2614309"></a><h3>
<a name="id2615368"></a><h3>
<a name="gimp-register-thumbnail-loader"></a>gimp_register_thumbnail_loader ()</h3>
<a class="indexterm" name="id2614325"></a><pre class="programlisting">gboolean gimp_register_thumbnail_loader (const gchar *load_proc,
<a class="indexterm" name="id2615383"></a><pre class="programlisting">gboolean gimp_register_thumbnail_loader (const gchar *load_proc,
const gchar *thumb_proc);</pre>
<p>
Associates a thumbnail loader with a file load procedure.
@ -510,20 +581,17 @@ using this function.</p>
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>load_proc</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>load_proc</code></em>&#160;:</span></td>
<td> The name of the procedure the thumbnail loader with.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>thumb_proc</code></em>&#160;:</span></td>
<td><span class="term"><em class="parameter"><code>thumb_proc</code></em>&#160;:</span></td>
<td> The name of the thumbnail load procedure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>