Does anybody have any advice for embedding png files using gtk? I used xxd to convert all the .png images into .h files, but I can't get them to show up right with gdk_pixbuf_new_from_data.
Printable View
Does anybody have any advice for embedding png files using gtk? I used xxd to convert all the .png images into .h files, but I can't get them to show up right with gdk_pixbuf_new_from_data.
GdkPixbuf.Pixbuf.new_from_bytes
You need to filter your png files through say imagemagik to get just the raw RGB data.Quote:
Currently only RGB images with 8 bits per sample are supported.
A close example:
imagemagick convert png 16 bit to raw - Stack Overflow
If you want GTK to handle all the PNG headers and compression, you need to use say new_from_file