Re: scaling pixbufs
- From: Dov Grobgeld <dov imagic weizmann ac il>
- To: fenn agora dhs org
- Cc: gtk-devel-list gnome org
- Subject: Re: scaling pixbufs
- Date: Wed, 4 Sep 2002 18:44:01 +0300
Have a look at my gtk_image_viewer_widget. It does exactly this.
The sources are on the gnome cvs server. You can also get the latest
release from:
http://imagic.weizmann.ac.il/~dov/freesw/gtk/gtk-image-viewer/
Please let me know if the example programs aren't sufficient to get
you going, and I might get around to actually writing some long
overdue docs.
Regards,
Dov
On Wed, Sep 04, 2002 at 10:16:08AM -0400, Tim F wrote:
> I'm writing a gtk (2.0.2) application that renders a pixbuf in a
> drawingarea, and I'd like the user to be able to "zoom" in and out of the
> pixbuf. I've gotten this to work quite well using
> gdk_pixbuf_scale_simple, but the pixbuf is large (3000x3000 pixels), and
> zooming in by much more than 2x, as you might guess, causes all kinds of
> memory and swapping troubles. Is there a way to leave the pixbuf as is,
> and simply alter the pixel ratio of the drawing_area (i.e. a 5x5 pixel on
> the drawing_area corresponds to a 1x1 pixel from the pixbuf)? One thing
> that may help is the original image loaded in the pixbuf is grayscale, but
> my understanding is that pixbufs can only be in RGB colorspace (so my
> image takes three times the amount of required memory) - is there any
> support for grayscale pixbufs in a development release of gtk+?
>
> Pardons if this question has already been dealt with before...
>
> Regards,
> Tim F
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
--
___ ___
/ o \ o \
Dov Grobgeld ( o o ) o |
The Weizmann Institute of Science, Israel \ o /o o /
"Where the tree of wisdom carries oranges" | | | |
_| |_ _| |_
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]