Re: Load image from memory.



On Tuesday 02 January 2007 13:33, Vivien Malerba wrote:
On 1/2/07, Eirik Brandtzæg <eirikbra stud hist no> wrote:
I'm trying to include a image in my Free Pascal program under linux.
First I loaded the image from a file using gtk_image_new_from_file, but I
want to have the picture inside the binary.

There is the GdkPixdata related API such as gdk_pixdata_to_csource().

Or you can store the image in XPM format in a header file (and load it with 
gdk_pixbuf_new_from_xpm_data()).  Both work equivalently, but most image 
viewers will save directly to XPM which may make it easier to obtain the 
image in a suitable format for incorporation in the header file.

Chris




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]