daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GdkPixbuf *ResizeImage(GdkPixbuf *pixbuf)
  2. {
  3.   int orig_width = gdk_pixbuf_get_width(pixbuf);
  4.   int orig_height = gdk_pixbuf_get_height(pixbuf);
  5.  
  6.   if (orig_width > 640 || orig_height > 480) {
  7.      orig_width = 640;
  8.      orig_height = 480;
  9.   }
  10.   GdkPixbuf *new_pixbuf = gdk_pixbuf_scale_simple(pixbuf, orig_width, orig_height, GDK_INTERP_BILINEAR);
  11.   return new_pixbuf;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top