mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-19 14:07:09 -05:00
Add rectangle scaling fix for bclim creation
Thanks slashmolder for help debugging!
This commit is contained in:
@@ -432,14 +432,14 @@ internal static int write16BitColorPalette(Bitmap img, ref MemoryStream ms)
|
||||
}
|
||||
return 7;
|
||||
}
|
||||
internal static void writeGeneric(int format, Bitmap img, ref MemoryStream ms)
|
||||
internal static void writeGeneric(int format, Bitmap img, ref MemoryStream ms, bool rectangle = true)
|
||||
{
|
||||
int w = img.Width;
|
||||
int h = img.Height;
|
||||
|
||||
// square format. Yay.
|
||||
w = h = Math.Max(nlpo2(w),nlpo2(h));
|
||||
if (format == 0 && Math.Min(img.Width, img.Height) > 64)
|
||||
if (rectangle && Math.Min(img.Width, img.Height) > 64)
|
||||
{
|
||||
w = nlpo2(img.Width);
|
||||
h = nlpo2(img.Height);
|
||||
|
||||
Reference in New Issue
Block a user