While using gotk3 I came across this problem of resizing images to fit the container. As @diamondburned explained gdk pixbufs are statically the same size as the original image. Then if I want different sizes I will have to resize it.
I began searching for resources and i found these incredible sources:
- https://gabmus.org/posts/create_an_auto-resizing_image_widget_with_gtk3_and_python/
- https://newbedev.com/automatic-image-scaling-on-resize-with-py-gtk
- https://ubuntuforums.org/showthread.php?t=761973
- http://darmawan-salihun.blogspot.com/2013/01/image-scaling-in-gtk-3-with-cairo.html?m=1
- https://www.programcreek.com/python/example/88404/gi.repository.Gtk.Image