[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Thumbnails
From: |
Richard Shann |
Subject: |
Re: [Denemo-devel] Thumbnails |
Date: |
Thu, 26 May 2011 20:48:32 +0100 |
On Mon, 2011-05-23 at 20:08 +0200, Till Hartmann wrote:
>
> mypaint uses pygtk, there's a convience method in gtk.gdk.pixbuf for
> additional metadata when saving pixbufs. I have no clue how it would
> look like in c GTK.
The code I am using looks like this (the mtime attribute is commented
out)
gchar *uri = g_strdup_printf("Thumb::URI\0file:///%s", thumbname);
static gchar *thumbnailsdir = NULL;
if(!thumbnailsdir) {
thumbnailsdir = g_build_filename (g_get_home_dir(),
".thumbnails", "large", NULL);
g_mkdir_with_parents(thumbnailsdir, 0700);
}
gchar * thumbpath = g_build_filename(thumbnailsdir,
thumbname, NULL);
//gchar *mt = g_strdup_printf("Thumb::MTime\0%d", mtime);
if(!gdk_pixbuf_save (pb, thumbpath, "png"/*type*/, &err,
"tEXt", uri/*, "tEXt", mt */, NULL))
this last line is the one saving attributes, type "tEXt" with value the
Thumb::URI and uri of the file separated by a NULL.
This gives an error message from gdkpixbuf
GdkPixbuf-WARNING **: Unrecognized parameter (tEXt) passed to PNG
saver.
which seems strange, not to say wrong.
Any ideas?
Richard
- Re: [Denemo-devel] Thumbnails, (continued)
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/26
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/29
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/29
- Re: [Denemo-devel] Thumbnails, Jeremiah Benham, 2011/05/29
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/30
- Re: [Denemo-devel] Thumbnails, Jeremiah Benham, 2011/05/30
Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/22
Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/23
- Re: [Denemo-devel] Thumbnails, Till Hartmann, 2011/05/23
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/24
- Re: [Denemo-devel] Thumbnails,
Richard Shann <=
- Re: [Denemo-devel] Thumbnails, Till Hartmann, 2011/05/26
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/27
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/27
- Re: [Denemo-devel] Thumbnails, Till Hartmann, 2011/05/27
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/27
- Re: [Denemo-devel] Thumbnails, Till Hartmann, 2011/05/27
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/28
- Re: [Denemo-devel] Thumbnails, Richard Shann, 2011/05/28