From f6a7773e4396fca0062b5892a470a3c961c15c3b Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sat, 11 Jul 2020 12:06:38 -0400 Subject: [PATCH] Only apply gamma fix automatically if the image output isn't .dds --- .../Forms/Editors/ImageEditor/ImageEditorBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs index be805615..4cff2f16 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs @@ -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; }