Re: loading pixmap from file slow
- From: Tom Bech <tomb ii uib no>
- To: gtk-list redhat com
- Subject: Re: loading pixmap from file slow
- Date: Tue, 09 Jun 1998 11:54:48 +0200
Hi,
[Code example snipped]
>
> Some seconds elapse between one and two. window is a normal toplevel
> GtkWindow (made global for this example). I don't see any reason to
> think I'm doing something unusual that would cause this. The image loads
> just fine (and quickly) in GIMP and xv. I haven't looked at the gdk code
> (I'd have to download it over a slow link), but I will if I don't hear an
> answer.
>
I suspect this is because there's a call to gdk_color_alloc for each pixel
in the xpm. The xpm loader should probably be rewritten to use a color context
instead. As I'm guilty of writing the original slow version, I guess
I'll have to take a hack at it soon; it shouldn't be too hard. If you're in
a hurry I guess you'll have to take a look at imlib.
[GTK praise snipped]
>
> The only thing I miss from other toolkits I've used is Tk's structured
> graphics Canvas.
>
IIRC, Quartic is working on such a widget for the GNOME project. I dont know
if this will be included in gtk+.
Regards,
Tom
--
tomb@gimp.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]