Skip to content

Commit

Permalink
Finalize removes the color channels from grayscale images.
Browse files Browse the repository at this point in the history
  • Loading branch information
Venomalia committed Oct 8, 2023
1 parent bdb8bce commit 535f6d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TextureExtraction tool/Scans/Finalize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ protected override void Scan(ScanObjekt so)
Image<Rgba32> imageRGBA = Image.Load<Rgba32>(so.Stream);
image = imageRGBA;

if (ImageHelper.IsGrayscale(imageRGBA))
{
goto case GXImageFormat.IA8;
}
if (!ImageHelper.IsAlphaNeeded(imageRGBA))
{
goto case GXImageFormat.RGB565;
Expand Down

0 comments on commit 535f6d3

Please sign in to comment.