I need to get the difference between two GTK 3 pixbuf images. Screenshot is captured in order to get images. get_byte_length gives the same value for different images. How could I get the difference?
Here is the code:
window = Gdk.get_default_root_window()
x, y, width, height = window.get_geometry()
pb = Gdk.pixbuf_get_from_window(window, x, y, width, height)
length1 = pb.get_byte_length()
Python 3.8, GTK 3.
There a performance difference in rendering the Pixbuf through retrieving a Cairo context through gtk.gdk.CairoContext vs converting the Pixbuf into a Cairo. Use this code:
It guess it also involves
.set_source_pixbuf() and .get_source().get_surface().