diff --git a/PKHeX.Drawing.PokeSprite/Builder/SpriteBuilder.cs b/PKHeX.Drawing.PokeSprite/Builder/SpriteBuilder.cs index 479e66672..95b5db060 100644 --- a/PKHeX.Drawing.PokeSprite/Builder/SpriteBuilder.cs +++ b/PKHeX.Drawing.PokeSprite/Builder/SpriteBuilder.cs @@ -145,9 +145,12 @@ public abstract class SpriteBuilder : ISpriteBuilder { var baseform = FormInfo.GetTotemBaseForm(species, form); var baseImage = GetBaseImageDefault(species, baseform, gender, formarg, shiny, context); - if (baseImage == null) + if (baseImage is not Bitmap b) return null; - return ImageUtil.ToGrayscale(baseImage); + + SpriteUtil.GetSpriteGlow(baseImage, 0, 165, 255, out var pixels, true); + var layer = ImageUtil.GetBitmap(pixels, b.Width, b.Height, b.PixelFormat); + return ImageUtil.LayerImage(baseImage, layer, 0, 0); } private Image? GetBaseImageDefault(ushort species, byte form, int gender, uint formarg, bool shiny, EntityContext context) diff --git a/PKHeX.Drawing/ImageUtil.cs b/PKHeX.Drawing/ImageUtil.cs index b755f37c2..30cb926cc 100644 --- a/PKHeX.Drawing/ImageUtil.cs +++ b/PKHeX.Drawing/ImageUtil.cs @@ -231,7 +231,7 @@ public static class ImageUtil { if (data[i + 3] == 0) continue; - byte greyS = (byte)(((0.3 * data[i + 2]) + (0.59 * data[i + 1]) + (0.11 * data[i + 0])) / 3); + byte greyS = (byte)(((0.3 * data[i + 2]) + (0.59 * data[i + 1]) + (0.11 * data[i + 0]))); data[i + 0] = greyS; data[i + 1] = greyS; data[i + 2] = greyS;