From 1942af277462ce9542e2f3e55d86a892361bc486 Mon Sep 17 00:00:00 2001 From: morkt Date: Thu, 9 Mar 2017 10:50:32 +0400 Subject: [PATCH] (GalReader.ReadJpeg): is_alpha argument is redundant. --- ArcFormats/LiveMaker/ImageGAL.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ArcFormats/LiveMaker/ImageGAL.cs b/ArcFormats/LiveMaker/ImageGAL.cs index cd159872..5f7ddd11 100644 --- a/ArcFormats/LiveMaker/ImageGAL.cs +++ b/ArcFormats/LiveMaker/ImageGAL.cs @@ -276,7 +276,7 @@ namespace GameRes.Formats.LiveMaker if (0 == m_info.Compression || 2 == m_info.Compression && is_alpha) return ReadZlib (frame, packed, is_alpha); if (2 == m_info.Compression) - return ReadJpeg (frame, packed, is_alpha); + return ReadJpeg (frame, packed); return ReadBlocks (frame, packed, is_alpha); } } @@ -371,7 +371,7 @@ namespace GameRes.Formats.LiveMaker return ReadBlocks (frame, zs, is_alpha); } - byte[] ReadJpeg (Frame frame, Stream packed, bool is_alpha) + byte[] ReadJpeg (Frame frame, Stream packed) { var decoder = new JpegBitmapDecoder (packed, BitmapCreateOptions.None, BitmapCacheOption.OnLoad); var bitmap = decoder.Frames[0]; @@ -379,8 +379,7 @@ namespace GameRes.Formats.LiveMaker int stride = bitmap.PixelWidth * bitmap.Format.BitsPerPixel / 8; var pixels = new byte[bitmap.PixelHeight * stride]; bitmap.CopyPixels (pixels, stride, 0); - if (!is_alpha) - frame.Stride = stride; + frame.Stride = stride; return pixels; }