Re: JPEG image scaling



Jian Zhang wrote:
> Hi, 
>  
> I'm trying to show an input jpeg file on a fixed area (for example an
> area of 320x320 pixels) on my LCD. What's the best way to scale it using
> gtk? I mean is there any api function that I can use?

Check out the API docs for GdkPixbuf.  Basically you can load the jpeg
into a Pixbuf, then scale it to an arbitrary size into a new GdkPixbuf
object.  You can then throw the original away if you want, and paint
this newly scaled pixbuf to the window, often a GtkDrawingArea.

>  
> Thanks,
> jian
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list


-- 
Michael Torrie
Assistant CSR, System Administrator
Chemistry and Biochemistry Department
Brigham Young University
Provo, UT 84602
+1.801.422.5771



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