Re: transferring images through ORBit and gdk_draw_rgb_image



Hi Peter,

On Thu, 2003-04-17 at 16:54, Peter Van Osta wrote:
> Is the way shown here, the best way to define the buffer:
> 
> typedef sequence<char,4> rgbximg;
...
> This would need an additional allocation step of 4ximages-size*char ?
> Each of the RGBX channels could be put into rgbximg[0,...,4] ?

	If I were you I'd send the data as a sequence<octet> since this is a
specially optimised case inside the ORB (for speed). Also, you can do:

CORBA_sequence_CORBA_octet seq;

seq._buffer = gdk_pixbuf_get_pixels (pixbuf);
seq._length = get_rowstride * get_height;

	Of course, you'll prolly want to embed that in a struct to parse the
width, height, depth, rowstride information as well.

	Really libbonoboui should have some helper here I guess ( in fact
libbonobo should have it and gdk-pixbuf should not be tied to gtk+, but
... ;-).

	HTH,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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