Re: GDK: fast image scaling - how?



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!




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