diff --git a/Changes b/Changes index be7aed4d20..7287706651 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,13 @@ -10.7.x.x (relative to 10.7.1.0) +10.7.x.x (relative to 10.7.1.1) ======== +10.7.1.1 (relative to 10.7.1.0) +======== + +Fixes +----- +- ImageReader, TextureLoader : Removed special case for colorspaces when opening pngs. 10.7.1.0 (relative to 10.7.0.0) ======== diff --git a/SConstruct b/SConstruct index 6f4bd33a79..3c87d37c69 100644 --- a/SConstruct +++ b/SConstruct @@ -54,7 +54,7 @@ SConsignFile() ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below ieCoreMajorVersion = 7 # backwards-incompatible changes ieCoreMinorVersion = 1 # new backwards-compatible features -ieCorePatchVersion = 0 # bug fixes +ieCorePatchVersion = 1 # bug fixes ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc. ########################################################################################### diff --git a/src/IECoreGL/TextureLoader.cpp b/src/IECoreGL/TextureLoader.cpp index df719176b9..aeeb4d5059 100644 --- a/src/IECoreGL/TextureLoader.cpp +++ b/src/IECoreGL/TextureLoader.cpp @@ -145,30 +145,14 @@ TexturePtr TextureLoader::load( const std::string &name, int maximumResolution ) } // This logic feels pretty broken - why do we ask the current color config's - // display transform to decide what colorspace a file is stored in? Why special - // case just png. But I've currently copied this logic from ImageReader in the + // display transform to decide what colorspace a file is stored in? + // But I've currently copied this logic from ImageReader in the // name of backwards compatibility std::string linearColorSpace; std::string currentColorSpace; OIIO::string_view fileFormat = imageBuf.file_format_name(); - if( fileFormat == "png" ) - { - // The most common use for loading PNGs via Cortex is for icons in Gaffer. - // If we were to use the OCIO config to guess the colorspaces as below, we - // would get it spectacularly wrong. For instance, with an ACES config the - // resulting icons are so washed out as to be illegible. Instead, we hardcode - // the rudimentary colour spaces much more likely to be associated with a PNG. - // These are supported by OIIO regardless of what OCIO config is in use. - /// \todo Should this apply to other formats too? Can we somehow fix - /// `OpenImageIOAlgo::colorSpace` instead? - linearColorSpace = "linear"; - currentColorSpace = "sRGB"; - } - else - { - linearColorSpace = IECoreImage::OpenImageIOAlgo::colorSpace( "", imageBuf.spec() ); - currentColorSpace = IECoreImage::OpenImageIOAlgo::colorSpace( fileFormat, imageBuf.spec() ); - } + linearColorSpace = IECoreImage::OpenImageIOAlgo::colorSpace( "", imageBuf.spec() ); + currentColorSpace = IECoreImage::OpenImageIOAlgo::colorSpace( fileFormat, imageBuf.spec() ); if( !OIIO::ImageBufAlgo::colorconvert( imageBuf, imageBuf, currentColorSpace, linearColorSpace ) ) { diff --git a/src/IECoreImage/ImageReader.cpp b/src/IECoreImage/ImageReader.cpp index 49dad2f9f3..0fd51dbb51 100644 --- a/src/IECoreImage/ImageReader.cpp +++ b/src/IECoreImage/ImageReader.cpp @@ -479,24 +479,8 @@ class ImageReader::Implementation OIIO::TypeString, &fileFormat ); - if( strcmp( fileFormat, "png" ) == 0 ) - { - // The most common use for loading PNGs via Cortex is for icons in Gaffer. - // If we were to use the OCIO config to guess the colorspaces as below, we - // would get it spectacularly wrong. For instance, with an ACES config the - // resulting icons are so washed out as to be illegible. Instead, we hardcode - // the rudimentary colour spaces much more likely to be associated with a PNG. - // These are supported by OIIO regardless of what OCIO config is in use. - /// \todo Should this apply to other formats too? Can we somehow fix - /// `OpenImageIOAlgo::colorSpace` instead? - m_linearColorSpace = "linear"; - m_currentColorSpace = "sRGB"; - } - else - { - m_linearColorSpace = OpenImageIOAlgo::colorSpace( "", *spec ); - m_currentColorSpace = OpenImageIOAlgo::colorSpace( fileFormat, *spec ); - } + m_linearColorSpace = OpenImageIOAlgo::colorSpace( "", *spec ); + m_currentColorSpace = OpenImageIOAlgo::colorSpace( fileFormat, *spec ); return true; }