1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Only apply gamma fix automatically if the image output isn't .dds

This commit is contained in:
KillzXGaming 2020-07-11 12:06:38 -04:00
parent 5a375defdb
commit f6a7773e43

View File

@ -1096,11 +1096,11 @@ namespace Toolbox.Library.Forms
if (dds.Format != ActiveTexture.Format)
DecodeTextureBack = true;
SaveAndApplyImage(dds.GetBitmap(), DecodeTextureBack);
SaveAndApplyImage(dds.GetBitmap(), DecodeTextureBack, true);
}
else
{
SaveAndApplyImage(new Bitmap(FileName), DecodeTextureBack);
SaveAndApplyImage(new Bitmap(FileName), DecodeTextureBack, false);
}
}
@ -1108,12 +1108,12 @@ namespace Toolbox.Library.Forms
FileWatcher.EnableRaisingEvents = false;
}
public void SaveAndApplyImage(Bitmap image, bool DecodeBack)
public void SaveAndApplyImage(Bitmap image, bool DecodeBack, bool isDDS)
{
if (image == null)
return;
if (Runtime.ImageEditor.PreviewGammaFix) {
if (Runtime.ImageEditor.PreviewGammaFix && !isDDS) {
image = BitmapExtension.AdjustGamma(image, 2.2f);
DecodeBack = true;
}