Re: Imagefile handling?



Juhana Sadeharju wrote:

Hello.

What is preferred way to deal with imagefiles?

Many image viewer applications simply opens up a large X11 pixmap
and thus they freeze if the image is 2000x2000 (say). Also, when
I zoom in to a large image in gqview, the zoomed image is again
one large pixmap -- like 8000x8000 if I zoom at ratio 4:1. This
brings the system down.

GQview uses a tile system to zoom images. Additional memory will be used when
zooming, but it is a finite amount based on the current window size and a
setting in preferences.

[very, very old releases of GQview did use one large Pixmap to scale images, it
also used Imlib]

Therefore, I need routines which handles imagefiles more better.
Any available?

GIMP seems to handle imagefiles correctly as the system is not
brought on knees there. Are those imagefile routines available
as a standalone easy-to-use library?

Sorry, do not know.

Has gdk-pixbuf a tile + disk cache system? What if I want load only
a small area from the imagefile? It looks like gdk_pixbuf_loader_set_size()
provides only a rescale operation but not a grop operation.

gdk-pixbuf can only load the complete image, therefor you will need enough
memory to hold the entire image in a GdkPixbuf. To scale a portion of the image
to screen, scale to a temporary GdkPixbuf with gdk_pixbuf_scale/composite, then
you can use gdk_pixbuf_render_to_drawable to paint the result to the screen.
This is what GQview does, more or less.

Perhaps eog is more efficient, and the code is certainly reusable.


Greetings,
John

-- 
John Ellis <johne bellatlantic net>

http://gqview.sourceforge.net <GQview> | http://gqapplets.sourceforge.net
http://gqmpeg.sourceforge.net <GQmpeg> |                  <panel applets>



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