Re: [gtk-list] Re: pixmap loading slowness
- From: raster redhat com
- To: gtk-list redhat com
- cc: tille physik uni-halle de
- Subject: Re: [gtk-list] Re: pixmap loading slowness
- Date: Mon, 9 Feb 1998 19:33:24 -0500 (EST)
On 9 Feb, Andreas Tille shouted:
-> On Sat, 7 Feb 1998 raster@redhat.com wrote:
->
-> > On 7 Feb, ALT2376@ritvax.isc.rit.edu shouted:
-> > -> Hello,
-> > -> has anyone noticed that gdk_create_pixmap_from_xpm_d() is very slow?.
-> > -> Its like 10 times slower than gdk_create_pixmap_from_xpm(). Gimp doesnt even
-> > -> use this routine to embed pixmap. Does anyone else have an alternative
-> > -> way(shorter) other than what gimp does?.
-> >
-> > use imlib - I am about to release imlib 1.0. I am working on
-> > documentation right now. I loads pixmaps fast xpm's, gif's, png's,
-> > ppm's jpeg's, pgm's etc. :) It also has the added bonus of doing a LOT
-> > of other things. :)
-> What is imlib and where can I found it?
currently a preliminary release is in the CVS tree for gnome.
-> I want to do the following:
->
-> 1) Reading some TIFF-Files (I want to do it myself using tifflib.
-> 2) Do some modifications with the Images in memory ending in
-> a buffer (char *) of 8-bit-gray values.
can be done. But you'll have to convert to RGB triples first. Imlib
works in full color - then you can create an image and render it. The
best solution is to create an image to start with, and just play with
the RGB data it points to - you are limited to the original data
remaining a certain size and creating an Imlib image out of data does
invole a memcpy operation (as the data may be static and Imlib will try
to free static data if you try and free an image pointing to static
data - then the program will segfault).
-> 3) I want to write this buffer as fast as possible into a window
-> (rectangle of width*height=sizeof(buffer)) of the screen.
-> 4) I have tried this by using gdk_create_pixmap_from_data() but
-> failed. It seems that I havn't understand the tutorial completely
-> but I didn't understand the philosophy and ended in a core dump
-> anyway.
no - the pixmap data is just an xpm's data segemnt (compiled) in a
program. it won't work like this.
-> 5) As the discussion above shows, the gdk_create_pixmap_...() functions
-> aren't optimized for speed and so I'm now looking for an appropriate
-> way to solve my problem.
despite the memcpy and the grey -> RGB triples Imlib will probably still
be faster.
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com /\___ /\ ___/||\___ ____/|/\___ raster@redhat.com
Carsten Haitzler | _ //__\\ __||_ __\\ ___|| _ / Red Hat Advanced
218/21 Conner Drive || // __ \\_ \ | | \ _/_|| / Development Labs
Chapel Hill NC 27514 USA ||\\\/ \//__/ |_| /___/||\\ 919 547 0012 ext 282
+1 (919) 929 9443, 801 4392 For pure Enlightenmenthttp://www.rasterman.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]