On Fri, Dec 03, 2010 at 08:35:22AM +0100, Arne Pagel wrote: > I am using gdk_pixbuf_save to store a gdk_drawable into a PNG File. > > Now I want to add a private data-chunk to PNG to store some additional > Information. > > Is it possible to add a private data-chunk with GDK functions?
You can add custom data using text chunks, pass "tEXT::somekey" as the option name and the value in text form as the value. This is often sufficient for simple auxiliary data. > If not, what do you think would be the best way to create this file? > > Using libpng with png_set_unknown_chunks() ? Yes. > Is there any examplke of how I get GDK-IMAGE-DATA to libpng? Definitely, but I can't offer any particularly clear one. But generally, GdkPixbuf stores data as R, G, B (,A) bytes that corresponds to PNG's PNG_COLOR_TYPE_RGB (PNG_COLOR_TYPE_RGB_ALPHA) with 8bit depth so you just have to set the PNG row pointers to the pixbuf rows. Yeti _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list