new function to get a pixbuf from a cairo surface