## Miscellaneous Thumbnail Functions Miscellaneous Thumbnail Functions |

## Synopsis

    #include <libgnomeui/gnome-thumbnail.h>

    gboolean            gnome_desktop_thumbnail_has_uri     (GdkPixbuf *pixbuf,
                                                             const char *uri);
    gboolean            gnome_desktop_thumbnail_is_valid    (GdkPixbuf *pixbuf,
                                                             const char *uri,
                                                             time_t mtime);
    char *              gnome_desktop_thumbnail_md5         (const char *uri);
    char *              gnome_desktop_thumbnail_path_for_uri
                                                            (const char *uri,
                                                             GnomeDesktopThumbnailSize size);
    GdkPixbuf *         gnome_desktop_thumbnail_scale_down_pixbuf
                                                            (GdkPixbuf *pixbuf,
                                                             int dest_width,
                                                             int dest_height);

## Description

## Details

### gnome_desktop_thumbnail_has_uri ()

    gboolean            gnome_desktop_thumbnail_has_uri     (GdkPixbuf *pixbuf,
                                                             const char *uri);

Returns whether the thumbnail has the correct uri embedded in the Thumb::URI option in the png.

`pixbuf` : | an loaded thumbnail pixbuf
`uri` : | a uri
Returns : | TRUE if the thumbnail is for `uri`

Since 2.2

### gnome_desktop_thumbnail_is_valid ()

    gboolean            gnome_desktop_thumbnail_is_valid    (GdkPixbuf *pixbuf,
                                                             const char *uri,
                                                             time_t mtime);

Returns whether the thumbnail has the correct uri and mtime embedded in the png options.

`pixbuf` : | an loaded thumbnail GdkPixbuf
`uri` : | a uri
`mtime` : | the mtime
Returns : | TRUE if the thumbnail has the right `uri` and `mtime`

Since 2.2

### gnome_desktop_thumbnail_md5 ()

    char *              gnome_desktop_thumbnail_md5         (const char *uri);

Calculates the MD5 checksum of the uri. This can be useful if you want to manually handle thumbnail files.

`uri` : | an uri
Returns : | A string with the MD5 digest of the uri string.

Since 2.2

### gnome_desktop_thumbnail_path_for_uri ()

    char *              gnome_desktop_thumbnail_path_for_uri
                                                            (const char *uri,
                                                             GnomeDesktopThumbnailSize size);

Returns the filename that a thumbnail of size `size` for `uri` would have.

`uri` : | an uri
`size` : | a thumbnail size
Returns : | an absolute filename

Since 2.2

### gnome_desktop_thumbnail_scale_down_pixbuf ()

    GdkPixbuf *         gnome_desktop_thumbnail_scale_down_pixbuf
                                                            (GdkPixbuf *pixbuf,
                                                             int dest_width,
                                                             int dest_height);