GtkImage needs scale API for pixbuf and filename
Submitted by Allison (desrt)
GtkImage is currently lacking an API to start from a file or pixbuf and display a scaled version of the image such that the scale factor is handled in a nice way (ie: not scaling down and then scaling back up again).
Presently it seems that the best that you can do is to load a pixbuf from the disk, scale it to the desired (logical) pixel size and then set it. If you have a scale-factor of two then it will be scaled up again.
There is an API that accepts a cairo_surface_t instead -- this could be used because cairo surfaces have scale factors, but it would require knowing in advance the proper scale factor to use (and re-rendering onto the surface each time and re-setting it).
What would be nice is an API that accepted a filename or a pixbuf along with a desired image size. Then we could do the scaling internally in a hidpi-aware fashion.