[gtkada] Would a patch be useful (gdk_pixbuf_new_from_data)

Thomas De Contes d.l.tDeContes at free.fr
Thu Jan 20 01:35:02 CET 2005


Le mercredi, 19 jan 2005, à 13:20 Europe/Paris, Jeffrey Creem a écrit :

>
> ----- Original Message ----- From: "Thomas De Contes"  
> <d.l.tDeContes at free.fr>
> To: "Jeffrey Creem" <jeff at thecreems.com>
> Cc: <gtkada at lists.adacore.com>
> Sent: Wednesday, January 19, 2005 7:00 AM
> Subject: Re: [gtkada] Would a patch be useful  
> (gdk_pixbuf_new_from_data)
>
>>> If one had a file that was raw binary bytes of the form of a inline  
>>> gdk data then something like this might be useful.
>>
>> in any case i made that for another things,
>>
>> the main thing is to have a tool to convert image files into the gdk
>> format :-)
>> how do you make that ?
>
>
>
> A full gtk developer install includes a tool called :
>
> gdk-pixbuf-csource
>
> That takes as input an image in a "standard" format such as PNG and  
> produces a C declaration
> in the appropriate format. For now I am just building this C file and  
> pragma Importing the resulting
> variable for use in the Ada side.

ah, so it produces a c file with a constant, as mine :-)
but it makes a conversion of the stream, the one in the c file is not  
the one in the file it has red, if i understand


> See
> http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf- 
> creating.html
>
> Which contains the API elements used in support of creating the
> gdk-pixbuf-csource
> utility.

you must have been mistaken, weren't you ?

it could be very interesting, if there is the function used by  
gdk-pixbuf-csource to make the conversion :-)
so, we could read the file in ada, call this c function to make the  
conversion, then make an ada package containing the stream, as my  
program does :-)

i can help if needed, as the author of my prgm, but i don't know  
programming in c




More information about the gtkada mailing list