On Fri, 2007-11-30 at 11:31 +0000, [EMAIL PROTECTED] wrote:
> On Nov 30, 2007 2:45 AM, Bin Chen <[EMAIL PROTECTED]> wrote:
> > image, but I am not familiar with XLib, so I want to know if it is
> > possible to use pure GTK+ API to achieve this? What about the
> > performance comparing to use XLib directly?
> 
> You can use gdk_draw_rgb_image() to paint an RGB array to the screen:
> 
> http://library.gnome.org/devel/gdk/unstable/gdk-GdkRGB.html#gdk-draw-rgb-image
> 
> This is a wrapper over the XImage functions, including XShm when
> available, plus some nice dithering code. It's about as quick as you
> can get with vanilla X11 calls. There's a tiny program in
> gtk+-2.x.x/tests/testrgb.c which benchmarks your computer for drawing
> speed with his operation. You could try that and see if it's going to
> be quick enough for you.
> 
> If you want to go faster, you need to use another (non-X11) rendering
> path. One possibility is the Xv extension, another is to go via
> OpenGL. Both are somewhat hairy :-( and much less portable. As Ken
> says, unless you really want to do this all yourself, GStreamer might
> be the way to go.

My decoded image is RGB565 format, this function is RGB32 format,
unfortunately my hardware also provides RGB565 capability... this means
the system need to do a RGB565 -> RGB32 -> RGB565 transalation... quite
unefficient.

Is there a more direct way?

Thanks.
Bin

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to