Scale an image in GTK

后端 未结 6 1670
太阳男子
太阳男子 2020-12-16 13:19

In GTK, how can I scale an image? Right now I load images with PIL and scale them beforehand, but is there a way to do it with GTK?

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 13:56

    It might be more effective to simply scale them before loading. I especially think so since I use these functions to load in 96x96 thumbnails from sometimes very large JPEGs, still very fast.

    gtk.gdk.pixbuf_new_from_file_at_scale(..)
    gtk.gdk.pixbuf_new_from_file_at_size(..)
    

提交回复
热议问题