Re: transferring images through ORBit and gdk_draw_rgb_image



Hi,


Thank you all very much for the information.

Peter
===================
Olivier Aubert wrote:
> 
> Hello.
> 
> I am facing the same problem, which I solved for the moment with this
> IDL :
> 
>   typedef sequence<octet> ByteSeq;
> 
>   struct RGBPicture {
>     short width;
>     short height;
>     long type;
>     ByteSeq data;
>   };
> 
> The type is a FOURCC code, and the various channels are interleaved i
> the data buffer. This structure was directly inspired by the source
> application I am interfacing with (VideoLan Client, see
> http://www.videolan.org/).
> 
> The easiest way I found to convert the raw data to some other format
> (pixbuf, png, ...) is to use the PIL library in python, which solves my
> problems in a minimum of lines of code :
> 
>     image = corba_object.get_snapshot (position);
>     i = Image.fromstring ("RGB", (image.width, image.height),
> image.data, "raw", "RGBX")
>     i.save (output, 'png')
> 
> (The last part of this message is just a shameless ad for python, which
> is a great language with an excellent CORBA binding).
> 
> Olivier

-- 
Met vriendelijke groet,
Best regards,

Peter Van Osta

Union Biometrica N.V./S.A.
European Scientific Operations (ESO)
Cipalstraat 3
B-2440 Geel
Belgium
Tel.: +32 (0)14 570 619
Fax.: +32 (0)14 570 621

http://www.unionbio.com/

http://ourworld.compuserve.com/homepages/pvosta/cvwww.htm



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