Skip to content

Commit

Permalink
Fix hio image loading to correspond to fix in GfColorSpace
Browse files Browse the repository at this point in the history
(Internal change: 2334979)
  • Loading branch information
meshula authored and pixar-oss committed Jul 23, 2024
1 parent a636a70 commit daf445c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pxr/imaging/plugin/hioAvif/AVIFImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ bool Hio_AVIFImage::ReadCropped(
inputFloat = outF32.data();
inputHalf = nullptr;
}
GfColorSpace dst(GfColorSpaceNames->LinearRec709);
GfColorSpace src(GfColorSpaceNames->SRGB);
GfColorSpace dst(GfColorSpaceNames->SRGB);
GfColorSpace src(GfColorSpaceNames->LinearRec709);
if (channelCount == 3)
dst.ConvertRGBSpan(src, TfSpan<float>(inputFloat, img.width * img.height * channelCount));
else
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/plugin/hioAvif/testenv/testHioAvif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ main(int argc, char *argv[])

{
// fetch basic information about the avif
std::string path = rootPath + csGrayAvif;
std::string path = csGrayAvif;
HioImageSharedPtr image = HioImage::OpenForReading(path);
TF_VERIFY(image);
TF_VERIFY(image->GetWidth() == width);
Expand Down

0 comments on commit daf445c

Please sign in to comment.