From d9c96a951ddf4fd0e8cd56c30518c7291a320706 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 5 Jul 2015 16:01:56 -0700 Subject: [PATCH] Detection to use specialized bclim methods --- pk3DS/3DS/BCLIM.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pk3DS/3DS/BCLIM.cs b/pk3DS/3DS/BCLIM.cs index fda1399..e4c8414 100644 --- a/pk3DS/3DS/BCLIM.cs +++ b/pk3DS/3DS/BCLIM.cs @@ -131,6 +131,10 @@ internal static Image makeBMP(string path, bool autosave = false, bool crop = tr // Bitmap Data Writing internal static Bitmap getIMG(CLIM bclim) { + if (bclim.FileFormat == 7 && BitConverter.ToUInt16(bclim.Data, 0) == 2) // XY7 + return getIMG_XY7(bclim); + if (bclim.FileFormat == 10 || bclim.FileFormat == 11) // Use ETC1 to get image instead. + return getIMG_ETC(bclim); // New Image Bitmap img = new Bitmap(nlpo2(gcm(bclim.Width,8)), nlpo2(gcm(bclim.Height,8))); int f = bclim.FileFormat;