#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

int main (int argc, char *argv[])
{
	GError *error = NULL;
	GdkPixbuf *pixbuf = NULL;
	GdkPixbuf *sized = NULL;
	double zoom = 0;

	gtk_init (&argc, &argv);
	pixbuf = gdk_pixbuf_new_from_file ("image.png", &error);
	sized = gdk_pixbuf_new_from_file ("image.png", &error);

	for (zoom = 1.0; zoom >= 0.0; zoom /= 2.0) {
		printf ("resizing to %f\n", zoom);
		gdk_pixbuf_scale (pixbuf, sized, 0, 0, 48.0 * zoom, 48.0 * zoom, 0, 0, zoom, zoom, GDK_INTERP_BILINEAR);
	}
	gdk_pixbuf_unref (pixbuf);
	gdk_pixbuf_unref (sized);
	return 0;
}
