mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-26 14:30:26 +00:00
Only apply gamma fix automatically if the image output isn't .dds
This commit is contained in:
parent
5a375defdb
commit
f6a7773e43
1 changed files with 4 additions and 4 deletions
|
@ -1096,11 +1096,11 @@ namespace Toolbox.Library.Forms
|
||||||
if (dds.Format != ActiveTexture.Format)
|
if (dds.Format != ActiveTexture.Format)
|
||||||
DecodeTextureBack = true;
|
DecodeTextureBack = true;
|
||||||
|
|
||||||
SaveAndApplyImage(dds.GetBitmap(), DecodeTextureBack);
|
SaveAndApplyImage(dds.GetBitmap(), DecodeTextureBack, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SaveAndApplyImage(new Bitmap(FileName), DecodeTextureBack);
|
SaveAndApplyImage(new Bitmap(FileName), DecodeTextureBack, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1108,12 +1108,12 @@ namespace Toolbox.Library.Forms
|
||||||
FileWatcher.EnableRaisingEvents = false;
|
FileWatcher.EnableRaisingEvents = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveAndApplyImage(Bitmap image, bool DecodeBack)
|
public void SaveAndApplyImage(Bitmap image, bool DecodeBack, bool isDDS)
|
||||||
{
|
{
|
||||||
if (image == null)
|
if (image == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Runtime.ImageEditor.PreviewGammaFix) {
|
if (Runtime.ImageEditor.PreviewGammaFix && !isDDS) {
|
||||||
image = BitmapExtension.AdjustGamma(image, 2.2f);
|
image = BitmapExtension.AdjustGamma(image, 2.2f);
|
||||||
DecodeBack = true;
|
DecodeBack = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue