mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +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)
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue