I have a analyze(canvas) function that performs a variety of operations on a GdkPixbuf which looks like this:
analyze(canvas)
GdkPixbuf
rotate(); // in respec