Skip to content

Commit

Permalink
Update to use newer tImagePNG interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescan committed Jan 14, 2024
1 parent 7564537 commit 6706317
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Src/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,10 +1165,10 @@ void Command::ParseSaveParametersPNG()
case tHash::tHashCT("bpp"):
switch (tHash::tHashString(value.Chr()))
{
case tHash::tHashCT("24"): SaveParamsPNG.Format = tImage::tImagePNG::tFormat::BPP24; break;
case tHash::tHashCT("32"): SaveParamsPNG.Format = tImage::tImagePNG::tFormat::BPP32; break;
case tHash::tHashCT("24"): SaveParamsPNG.Format = tImage::tImagePNG::tFormat::BPP24_RGB_BPC8; break;
case tHash::tHashCT("32"): SaveParamsPNG.Format = tImage::tImagePNG::tFormat::BPP32_RGBA_BPC8; break;
case tHash::tHashCT("auto"):
case tHash::tHashCT("*"): SaveParamsPNG.Format = tImage::tImagePNG::tFormat::Auto; break;
case tHash::tHashCT("*"): SaveParamsPNG.Format = tImage::tImagePNG::tFormat::Auto; break;
}
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ bool Image::Save(const tString& outFile, tFileType fileType, bool useConfigSaveP
params.Format = tImagePNG::tFormat::Auto;
switch (profile.SaveFilePngDepthMode)
{
case 1: params.Format = tImagePNG::tFormat::BPP24; break;
case 2: params.Format = tImagePNG::tFormat::BPP32; break;
case 1: params.Format = tImagePNG::tFormat::BPP24_RGB_BPC8; break;
case 2: params.Format = tImagePNG::tFormat::BPP32_RGBA_BPC8; break;
}
}
tImagePNG::tFormat savedFmt = png.Save(outFile, params);
Expand Down
4 changes: 2 additions & 2 deletions Src/OpenSaveDialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,8 @@ bool Viewer::SavePictureAs(tImage::tPicture& picture, const tString& outFile, tF
tImagePNG::tFormat saveFormat = tImagePNG::tFormat::Auto;
switch (profile.SaveFilePngDepthMode)
{
case 1: saveFormat = tImagePNG::tFormat::BPP24; break;
case 2: saveFormat = tImagePNG::tFormat::BPP32; break;
case 1: saveFormat = tImagePNG::tFormat::BPP24_RGB_BPC8; break;
case 2: saveFormat = tImagePNG::tFormat::BPP32_RGBA_BPC8; break;
}
tImagePNG::tFormat savedFmt = png.Save(outFile, saveFormat);
success = (savedFmt != tImagePNG::tFormat::Invalid);
Expand Down

0 comments on commit 6706317

Please sign in to comment.