What do you think? Any ideas, comments, suggestions? It sounds reasonable, The main drawback from my perspective is that I have no way of testing if whatever I implement (if you're asking me to implement it) is correct or not. I mean, I just used this ImageCms module to do something that seems sensible and that looks on my screen similar to what e.g. Gimp shows, but I don't know if it's taking into account my monitor profile (if any), or if it's clipping stuff that needn't be clipped, or something...
I've figured out how to read an embedded profile from a pixbuf For the record (in case this becomes useful in the future), this is how I could read the profile: pixbuf = GdkPixbuf.Pixbuf.new_from_file(path) icc = pixbuf.get_options().get('icc-profile', None) if icc is not None: icc = ImageCms.ImageCmsProfile(BytesIO(base64.b64decode(icc))) and to preserve the profile when coverting a PIL image to a pixbuf: icc = image.info.get('icc_profile', None) if icc: pixbuf.set_option('icc-profile', base64.b64encode(icc))...
It's not merged in the (remote) master yet, is it? If isn't, it's probably safe to press the merge button, if that's what you want (although you may get conflicts with your local master branch, if you've merged it there). I don't know how exactly SF works, though, I have mostly experience with GitLab.
Revert "Try to fix random failure to restore window geometry"
Try to fix random failure to restore window geometry
Try to fix random failure to restore window geometry
I've figured out how to read an embedded profile from a pixbuf, so I'll try to rewrite this. Great, looking forward to it! I'm afraid it won't work. Yes, I can read a profile from a pixbuf created directly from file, and yes, I can also make sure that the profile is preserved when converting a PIL image to a pixbuf. But GdkPixbuf does not support CMYK, it only supports RGB (https://docs.gtk.org/gdk-pixbuf/property.Pixbuf.colorspace.html), and a JPG (or anything else, I assume) is probably converted...
I've figured out how to read an embedded profile from a pixbuf, so I'll try to rewrite this. Great, looking forward to it! I'm afraid it won't work. Yes, I can read a profile from a pixbuf created directly from file, and yes, I can also make sure that the profile is preserved when converting a PIL image to a pixbuf. But GdkPixbuf does not support CMYK, it only supports RGB (https://docs.gtk.org/gdk-pixbuf/property.Pixbuf.colorspace.html), and a JPG (or anything else, I assume) is probably converted...