#include<gdkmm/pixbuf.h>
#include<gtkmm/main.h>

void pixbuf_cleanup(const guint8* data) {
  delete []data;
}

int main(int argc, char **argv) {
  Gtk::Main foo(argc, argv);
  Glib::RefPtr<Gdk::Pixbuf> big;
  Glib::RefPtr<Gdk::Pixbuf> small;
  unsigned char *data;

  data = new guint8[64*128*4];
  big = Gdk::Pixbuf::create_from_data(data, Gdk::COLORSPACE_RGB, true, 8, 64, 128, 64*4, pixbuf_cleanup);

  data = new guint8[64*64*4];
  small = Gdk::Pixbuf::create_from_data(data, Gdk::COLORSPACE_RGB, true, 8, 64, 64, 64*4, pixbuf_cleanup);

  small->composite(big, 0, 64, 64, 64, 0, 0, 1, 1, Gdk::INTERP_NEAREST, 255);

  return 0;
}
