Re: [gtk-list] Re: GdkImage vs. pixmaps, speed.



You might also try using a combination of ImageMagick and GdkMagick
(http://home.earthlink.net/~lightmanaj/GdkMagick). ImageMagick includes an
entire suite of high-quality drawing primitives (not to mention a powerful
image loading facility), and GdkMagick allows an ImageMagick image to be
rendered into a GdkPixmap.

The API in GdkMagick version 0.5.1 is subject to change. Once I finish version
0.6, I will (hopefully) freeze the API and prepare to move GdkMagick into BETA.

Thanks,
--Arthur

On Tue, 23 Nov 1999, Havoc Pennington wrote:
> On Tue, 23 Nov 1999, John C Atkeson wrote:
> >   
> >   Does this mean that if I plot 100,000 lines to a GdkImage (then load
> > the finished raster) it will be significantly faster than plotting them
> > straight to a pixmap?  
> 
> It will be faster to draw. However, you have two remaining issues: 
>  - what routines will you use to draw? there's no gdk_draw_line() 
>    for GdkImage
>  - you have to copy the image onto the server for rendering, so this 
>    can be slow (but not as slow as 60,000 draw calls).
> 
> The best way to do this is to use GdkRGB (gdk/gdkrgb.h). Draw into this
> RGB buffer, then call the GdkRGB functions to copy to a drawable (window
> or pixmap). Internally, GdkRGB is using GdkImage, but an RGB buffer is
> more convenient to deal with than a GdkImage.
> 
> You still need drawing routines if you want to draw anything other than
> single pixels though. You might look at the Guppi source code; Guppi
> probably won't compile right now, but it contains the "mi" scan conversion
> library. guppi2/src/libguppi/rgbdraw.h in CVS should be interesting to
> you.
> 
> GNU Plotutils is another interesting library for this. libart (comes with
> gnome-libs) works too but is optimized for quality over speed.
> 
> Havoc
> 
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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