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



_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel

Reply via email to