Disco.Services.ImagingExtensions.EmbedIconOverlay C# (CSharp) Method

EmbedIconOverlay() public static method

public static EmbedIconOverlay ( this Source, Image Icon ) : void
Source this
Icon Image
return void
        public static void EmbedIconOverlay(this Image Source, Image Icon)
        {
            int top = Math.Max(0, Source.Height - Icon.Height);
            int left = Math.Max(0, Source.Width - Icon.Width);

            using (Graphics sourceGraphics = Graphics.FromImage(Source))
            {
                sourceGraphics.DrawImage(Icon, left, top);
            }
        }