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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>GimpThumbnail</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="GIMP Thumbnail Library Reference Manual"><link rel="up" href="libgimpthumb.html" title="PartI.GIMP Thumbnail Library"><link rel="prev" href="libgimpthumb.html" title="PartI.GIMP Thumbnail Library"><link rel="next" href="libgimpthumb-gimpthumb-utils.html" title="gimpthumb-utils"><meta name="generator" content="GTK-Doc V1.3 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="libgimpthumb.html" title="PartI.GIMP Thumbnail Library"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libgimpthumb.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="libgimpthumb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GIMP Thumbnail Library Reference Manual</th><td><a accesskey="n" href="libgimpthumb-gimpthumb-utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="GimpThumbnail"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">GimpThumbnail</span></h2><p>GimpThumbnail — The GimpThumbnail object</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
<a href="GimpThumbnail.html#GimpThumbnail-struct">GimpThumbnail</a>;
<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a>* <a href="GimpThumbnail.html#gimp-thumbnail-new">gimp_thumbnail_new</a> (void);
void <a href="GimpThumbnail.html#gimp-thumbnail-set-uri">gimp_thumbnail_set_uri</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *uri);
gboolean <a href="GimpThumbnail.html#gimp-thumbnail-set-filename">gimp_thumbnail_set_filename</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *filename,
GError **error);
gboolean <a href="GimpThumbnail.html#gimp-thumbnail-set-from-thumb">gimp_thumbnail_set_from_thumb</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *filename,
GError **error);
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> <a href="GimpThumbnail.html#gimp-thumbnail-peek-image">gimp_thumbnail_peek_image</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail);
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> <a href="GimpThumbnail.html#gimp-thumbnail-peek-thumb">gimp_thumbnail_peek_thumb</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size);
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> <a href="GimpThumbnail.html#gimp-thumbnail-check-thumb">gimp_thumbnail_check_thumb</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size);
GdkPixbuf* <a href="GimpThumbnail.html#gimp-thumbnail-load-thumb">gimp_thumbnail_load_thumb</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size,
GError **error);
gboolean <a href="GimpThumbnail.html#gimp-thumbnail-save-thumb">gimp_thumbnail_save_thumb</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
GdkPixbuf *pixbuf,
const gchar *software,
GError **error);
gboolean <a href="GimpThumbnail.html#gimp-thumbnail-save-thumb-local">gimp_thumbnail_save_thumb_local</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
GdkPixbuf *pixbuf,
const gchar *software,
GError **error);
gboolean <a href="GimpThumbnail.html#gimp-thumbnail-save-failure">gimp_thumbnail_save_failure</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *software,
GError **error);
void <a href="GimpThumbnail.html#gimp-thumbnail-delete-failure">gimp_thumbnail_delete_failure</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail);
void <a href="GimpThumbnail.html#gimp-thumbnail-delete-others">gimp_thumbnail_delete_others</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size);
gboolean <a href="GimpThumbnail.html#gimp-thumbnail-has-failed">gimp_thumbnail_has_failed</a> (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail);
</pre></div><div class="refsect1" lang="en"><a name="id2550246"></a><h2>Object Hierarchy</h2><pre class="synopsis">
GObject
+----GimpThumbnail
</pre></div><div class="refsect1" lang="en"><a name="id2550261"></a><h2>Properties</h2><pre class="synopsis">
"<a href="GimpThumbnail.html#GimpThumbnail--image-filesize">image-filesize</a>" gint64 : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-height">image-height</a>" gint : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-mimetype">image-mimetype</a>" gchararray : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-mtime">image-mtime</a>" gint64 : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-num-layers">image-num-layers</a>" gint : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-state">image-state</a>" <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-type">image-type</a>" gchararray : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-uri">image-uri</a>" gchararray : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--image-width">image-width</a>" gint : Read / Write
"<a href="GimpThumbnail.html#GimpThumbnail--thumb-state">thumb-state</a>" <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> : Read / Write
</pre></div><div class="refsect1" lang="en"><a name="id2550380"></a><h2>Description</h2><p>
</p></div><div class="refsect1" lang="en"><a name="id2550389"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2550395"></a><h3><a name="GimpThumbnail-struct"></a>GimpThumbnail</h3><a class="indexterm" name="id2550403"></a><pre class="programlisting">typedef struct _GimpThumbnail GimpThumbnail;</pre><p>
All members of <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> are private and should only be accessed
using object properties.
</p></div><hr><div class="refsect2" lang="en"><a name="id2550421"></a><h3><a name="gimp-thumbnail-new"></a>gimp_thumbnail_new ()</h3><a class="indexterm" name="id2550430"></a><pre class="programlisting"><a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a>* gimp_thumbnail_new (void);</pre><p>
Creates a new <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> a newly allocated GimpThumbnail object
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2467954"></a><h3><a name="gimp-thumbnail-set-uri"></a>gimp_thumbnail_set_uri ()</h3><a class="indexterm" name="id2467963"></a><pre class="programlisting">void gimp_thumbnail_set_uri (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *uri);</pre><p>
Sets the location of the image file associated with the <span class="type">thumbnail</span>.
</p><p>
All informations stored in the <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> are reset.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>uri</tt></i>:</span></td><td> an escaped URI
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2468041"></a><h3><a name="gimp-thumbnail-set-filename"></a>gimp_thumbnail_set_filename ()</h3><a class="indexterm" name="id2468050"></a><pre class="programlisting">gboolean gimp_thumbnail_set_filename (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *filename,
GError **error);</pre><p>
Sets the location of the image file associated with the <span class="type">thumbnail</span>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>filename</tt></i>:</span></td><td> a local filename in the encoding of the filesystem
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> return location for possible errors
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if the filename was successfully set,
<tt class="literal">FALSE</tt> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2468155"></a><h3><a name="gimp-thumbnail-set-from-thumb"></a>gimp_thumbnail_set_from_thumb ()</h3><a class="indexterm" name="id2468166"></a><pre class="programlisting">gboolean gimp_thumbnail_set_from_thumb (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *filename,
GError **error);</pre><p>
This function tries to load the thumbnail file pointed to by
<i class="parameter"><tt>filename</tt></i> and retrieves the URI of the original image file from
it. This allows you to find the image file associated with a
thumbnail file.
</p><p>
This will only work with thumbnails from the global thumbnail
directory that contain a valid Thumb::URI tag.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>filename</tt></i>:</span></td><td> filename of a local thumbnail file
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> return location for possible errors
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if the pixbuf could be loaded, <tt class="literal">FALSE</tt> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2582667"></a><h3><a name="gimp-thumbnail-peek-image"></a>gimp_thumbnail_peek_image ()</h3><a class="indexterm" name="id2582676"></a><pre class="programlisting"><a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> gimp_thumbnail_peek_image (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail);</pre><p>
Checks the image file associated with the <i class="parameter"><tt>thumbnail</tt></i> and updates
information such as state, filesize and modification time.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the image's <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState"><span class="type">GimpThumbState</span></a> after the update
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2582742"></a><h3><a name="gimp-thumbnail-peek-thumb"></a>gimp_thumbnail_peek_thumb ()</h3><a class="indexterm" name="id2582751"></a><pre class="programlisting"><a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> gimp_thumbnail_peek_thumb (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size);</pre><p>
Checks if a thumbnail file for the <i class="parameter"><tt>thumbnail</tt></i> exists. It doesn't
load the thumbnail image and thus cannot check if the thumbnail is
valid and uptodate for the image file asosciated with the
<i class="parameter"><tt>thumbnail</tt></i>.
</p><p>
If you want to check the thumbnail, either attempt to load it using
<a href="GimpThumbnail.html#gimp-thumbnail-load-thumb"><tt class="function">gimp_thumbnail_load_thumb()</tt></a>, or, if you don't need the resulting
thumbnail pixbuf, use <a href="GimpThumbnail.html#gimp-thumbnail-check-thumb"><tt class="function">gimp_thumbnail_check_thumb()</tt></a>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>:</span></td><td> the preferred size of the thumbnail image
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the thumbnail's <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState"><span class="type">GimpThumbState</span></a> after the update
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2582857"></a><h3><a name="gimp-thumbnail-check-thumb"></a>gimp_thumbnail_check_thumb ()</h3><a class="indexterm" name="id2582866"></a><pre class="programlisting"><a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> gimp_thumbnail_check_thumb (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size);</pre><p>
Checks if a thumbnail file for the <i class="parameter"><tt>thumbnail</tt></i> exists, loads it and
verifies it is valid and uptodate for the image file asosciated
with the <i class="parameter"><tt>thumbnail</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>:</span></td><td> the preferred size of the thumbnail image
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the thumbnail's <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState"><span class="type">GimpThumbState</span></a> after the update
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2582870"></a><h3><a name="gimp-thumbnail-load-thumb"></a>gimp_thumbnail_load_thumb ()</h3><a class="indexterm" name="id2582877"></a><pre class="programlisting">GdkPixbuf* gimp_thumbnail_load_thumb (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size,
GError **error);</pre><p>
Attempts to load a thumbnail preview for the image associated with
<i class="parameter"><tt>thumbnail</tt></i>. Before you use this function you need need to set an
image location using <a href="GimpThumbnail.html#gimp-thumbnail-set-uri"><tt class="function">gimp_thumbnail_set_uri()</tt></a> or
<a href="GimpThumbnail.html#gimp-thumbnail-set-filename"><tt class="function">gimp_thumbnail_set_filename()</tt></a>. You can also peek at the thumb
before loading it using gimp_thumbnail_peek_thumb.
</p><p>
This function will return the best matching pixbuf for the
specified <i class="parameter"><tt>size</tt></i>. It returns the pixbuf as loaded from disk. It is
left to the caller to scale it to the desired size. The returned
pixbuf may also represent an outdated preview of the image file.
In order to verify if the preview is uptodate, you should check the
"thumb_state" property after calling this function.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>:</span></td><td> the preferred <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize"><span class="type">GimpThumbSize</span></a> for the preview
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> return location for possible errors
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> a preview pixbuf or <tt class="literal">NULL</tt> if no thumbnail was found
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2582998"></a><h3><a name="gimp-thumbnail-save-thumb"></a>gimp_thumbnail_save_thumb ()</h3><a class="indexterm" name="id2583006"></a><pre class="programlisting">gboolean gimp_thumbnail_save_thumb (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
GdkPixbuf *pixbuf,
const gchar *software,
GError **error);</pre><p>
Saves a preview thumbnail for the image associated with <i class="parameter"><tt>thumbnail</tt></i>.
to the global thumbnail repository.
</p><p>
The caller is responsible for setting the image file location, it's
filesize, modification time. One way to set this info is to is to
call <a href="GimpThumbnail.html#gimp-thumbnail-set-uri"><tt class="function">gimp_thumbnail_set_uri()</tt></a> followed by <a href="GimpThumbnail.html#gimp-thumbnail-peek-image"><tt class="function">gimp_thumbnail_peek_image()</tt></a>.
Since this won't work for remote images, it is left to the user of
<a href="GimpThumbnail.html#gimp-thumbnail-save-thumb"><tt class="function">gimp_thumbnail_save_thumb()</tt></a> to do this or to set the information
using the <i class="parameter"><tt>thumbnail</tt></i> object properties.
</p><p>
The image format type and the number of layers can optionally be
set in order to be stored with the preview image.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>pixbuf</tt></i>:</span></td><td> a <span class="type">GdkPixbuf</span> representing the preview thumbnail
</td></tr><tr><td><span class="term"><i class="parameter"><tt>software</tt></i>:</span></td><td> a string describing the software saving the thumbnail
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> return location for possible errors
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if a thumbnail was successfully written,
<tt class="literal">FALSE</tt> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2583156"></a><h3><a name="gimp-thumbnail-save-thumb-local"></a>gimp_thumbnail_save_thumb_local ()</h3><a class="indexterm" name="id2583165"></a><pre class="programlisting">gboolean gimp_thumbnail_save_thumb_local (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
GdkPixbuf *pixbuf,
const gchar *software,
GError **error);</pre><p>
Saves a preview thumbnail for the image associated with <i class="parameter"><tt>thumbnail</tt></i>
to the local thumbnail repository. Local thumbnails have been added
with version 0.7 of the spec.
</p><p>
Please see also <a href="GimpThumbnail.html#gimp-thumbnail-save-thumb"><tt class="function">gimp_thumbnail_save_thumb()</tt></a>. The notes made there
apply here as well.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>pixbuf</tt></i>:</span></td><td> a <span class="type">GdkPixbuf</span> representing the preview thumbnail
</td></tr><tr><td><span class="term"><i class="parameter"><tt>software</tt></i>:</span></td><td> a string describing the software saving the thumbnail
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> return location for possible errors
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if a thumbnail was successfully written,
<tt class="literal">FALSE</tt> otherwise
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2583303"></a><h3><a name="gimp-thumbnail-save-failure"></a>gimp_thumbnail_save_failure ()</h3><a class="indexterm" name="id2583311"></a><pre class="programlisting">gboolean gimp_thumbnail_save_failure (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
const gchar *software,
GError **error);</pre><p>
Saves a failure thumbnail for the image associated with
<i class="parameter"><tt>thumbnail</tt></i>. This is an empty pixbuf that indicates that an attempt
to create a preview for the image file failed. It should be used to
prevent the software from further attempts to create this thumbnail.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>software</tt></i>:</span></td><td> a string describing the software saving the thumbnail
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> return location for possible errors
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if a failure thumbnail was successfully written,
<tt class="literal">FALSE</tt> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2583414"></a><h3><a name="gimp-thumbnail-delete-failure"></a>gimp_thumbnail_delete_failure ()</h3><a class="indexterm" name="id2583423"></a><pre class="programlisting">void gimp_thumbnail_delete_failure (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail);</pre><p>
Removes a failure thumbnail if one exists. This function should be
used after a thumbnail has been successfully created.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2583472"></a><h3><a name="gimp-thumbnail-delete-others"></a>gimp_thumbnail_delete_others ()</h3><a class="indexterm" name="id2583480"></a><pre class="programlisting">void gimp_thumbnail_delete_others (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail,
<a href="libgimpthumb-gimpthumb-enums.html#GimpThumbSize">GimpThumbSize</a> size);</pre><p>
Removes all other thumbnails from the global thumbnail
repository. Only the thumbnail for <i class="parameter"><tt>size</tt></i> is not deleted. This
function should be used after a thumbnail has been successfully
updated. See the spec for a more detailed description on when to
delete thumbnails.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>:</span></td><td> the thumbnail size which should not be deleted
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2583553"></a><h3><a name="gimp-thumbnail-has-failed"></a>gimp_thumbnail_has_failed ()</h3><a class="indexterm" name="id2583562"></a><pre class="programlisting">gboolean gimp_thumbnail_has_failed (<a href="GimpThumbnail.html" title="GimpThumbnail">GimpThumbnail</a> *thumbnail);</pre><p>
Checks if a valid failure thumbnail for the given thumbnail exists
in the global thumbnail repository. This may be the case even if
<a href="GimpThumbnail.html#gimp-thumbnail-peek-thumb"><tt class="function">gimp_thumbnail_peek_thumb()</tt></a> doesn't return <tt class="literal">GIMP_THUMB_STATE_FAILED</tt>
since there might be a real thumbnail and a failure thumbnail for
the same image file.
</p><p>
The application should not attempt to create the thumbnail if a
valid failure thumbnail exists.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>thumbnail</tt></i>:</span></td><td> a <a href="GimpThumbnail.html" title="GimpThumbnail"><span class="type">GimpThumbnail</span></a> object
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if a failure thumbnail exists or
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div></div><div class="refsect1" lang="en"><a name="id2583641"></a><h2>Properties</h2><div class="refsect2" lang="en"><a name="id2583647"></a><h3><a name="GimpThumbnail--image-filesize"></a>The "<tt class="literal">image-filesize</tt>" property</h3><pre class="programlisting"> "image-filesize" gint64 : Read / Write</pre><p>Size of the image file in bytes.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id2583675"></a><h3><a name="GimpThumbnail--image-height"></a>The "<tt class="literal">image-height</tt>" property</h3><pre class="programlisting"> "image-height" gint : Read / Write</pre><p>Height of the image in pixels.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id2583704"></a><h3><a name="GimpThumbnail--image-mimetype"></a>The "<tt class="literal">image-mimetype</tt>" property</h3><pre class="programlisting"> "image-mimetype" gchararray : Read / Write</pre><p>Image mimetype.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id2583729"></a><h3><a name="GimpThumbnail--image-mtime"></a>The "<tt class="literal">image-mtime</tt>" property</h3><pre class="programlisting"> "image-mtime" gint64 : Read / Write</pre><p>Modification time of the image file in seconds since the Epoch.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id2583759"></a><h3><a name="GimpThumbnail--image-num-layers"></a>The "<tt class="literal">image-num-layers</tt>" property</h3><pre class="programlisting"> "image-num-layers" gint : Read / Write</pre><p>The number of layers in the image.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id2583787"></a><h3><a name="GimpThumbnail--image-state"></a>The "<tt class="literal">image-state</tt>" property</h3><pre class="programlisting"> "image-state" <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> : Read / Write</pre><p>State of the image associated to the thumbnail object.</p><p>Default value: GIMP_THUMB_STATE_UNKNOWN</p></div><hr><div class="refsect2" lang="en"><a name="id2583814"></a><h3><a name="GimpThumbnail--image-type"></a>The "<tt class="literal">image-type</tt>" property</h3><pre class="programlisting"> "image-type" gchararray : Read / Write</pre><p>String describing the type of the image format.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id2583840"></a><h3><a name="GimpThumbnail--image-uri"></a>The "<tt class="literal">image-uri</tt>" property</h3><pre class="programlisting"> "image-uri" gchararray : Read / Write</pre><p>URI of the image file.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id2583865"></a><h3><a name="GimpThumbnail--image-width"></a>The "<tt class="literal">image-width</tt>" property</h3><pre class="programlisting"> "image-width" gint : Read / Write</pre><p>Width of the image in pixels.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id2583894"></a><h3><a name="GimpThumbnail--thumb-state"></a>The "<tt class="literal">thumb-state</tt>" property</h3><pre class="programlisting"> "thumb-state" <a href="libgimpthumb-gimpthumb-enums.html#GimpThumbState">GimpThumbState</a> : Read / Write</pre><p>State of the thumbnail file.</p><p>Default value: GIMP_THUMB_STATE_UNKNOWN</p></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libgimpthumb.html"><b><<PartI.GIMP Thumbnail Library</b></a></td><td align="right"><a accesskey="n" href="libgimpthumb-gimpthumb-utils.html"><b>gimpthumb-utils>></b></a></td></tr></table></body></html>
|