Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Image : Prefer Qt's image reading to IECoreImage
This fixes #5695, by avoiding the colour conversions done by `IECoreImage::ImageReader` which were failing due to AcademySoftwareFoundation/OpenImageIO#4165. We want to phase `IECoreImage` out completely anyway, so this represents good progress in that direction. Although `_qtPixmapFromImagePrimitive()` and the `Image( ImagePrimitive )` constructor are now completely unused in Gaffer itself, we can't remove them just yet because they are used in extension code at IE. There's a reasonable case for using OpenImageIO here instead of Qt, to get access to a broader range of image formats and to match exactly the capabilities of ImageGadget. I tried implementing that but OpenImageIO isn't really usable from Python without `numpy`, and we don't ship with that module at present. It would be possible to implement an ImageBuf->QPixmap conversion in C++ and then bind that to Python if we consider this important. But practically speaking I think we only really care about common icon formats here, and Qt does fine with those, so I've gone with the simple option for now.
- Loading branch information