Re: GDK: fast image scaling - how?



there's a bunch of gtk+ packages that 
go together:

-glib/gobject
-pango
-atk
-gdk
-gtk
-gdk-pixbuf
(all of which ofcourse
depend on pkg-config)

theese functions are found in
`gdk-pixbuf'.

documentation is at:
http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/index.html
        and
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html

And I believe theese functions are available 
in 1.2 also (I'm currently useing 1.3.5 dev
release for some projects).


Cheers,
                -Tristan

RevX gmx at wrote:

Hi Tristan,

the function header you've sent me looks like the one I need,
BUT I haven't found it in the GDK files that came with gtk+ 1.2.10!
I also haven't found gdk-pixbuf.h. Maybe this is for gtk+ 2 only?
I've tried to look up the API reference for gtk+ 2 but couldn't
find that scaling function, too. Undocumented?

Is there a way to install the "new" GDK (2.0?) in an 1.2 installation?
Or: can you supply the source code for that function?

Anyways, thanks for helping!

Michael.

      This is the most basic methid I know.
(You probably want GDK_INTERP_NEAREST
but GDK_INTERP_HYPER is working good
for me with downscaling).

****** extract from gdk-pixbuf.h *********

/* Interpolation modes */
typedef enum {
      GDK_INTERP_NEAREST,
      GDK_INTERP_TILES,
      GDK_INTERP_BILINEAR,
      GDK_INTERP_HYPER
} GdkInterpType;


GdkPixbuf *gdk_pixbuf_scale_simple           (const GdkPixbuf *src,

                              int              dest_width,

                              int              dest_height,

                              GdkInterpType    interp_type);

******* end extract *********


--
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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