You can find more details at: Add Signature to an Image Programmatically in C#
Last active
March 19, 2022 23:33
-
-
Save aspose-com-gists/3282f54b177fff588150dc78dd0f647e to your computer and use it in GitHub Desktop.
Add Signature to an Image Programmatically in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create an instance of Image to load the primary image | |
using (Image canvas = Image.Load("layers.psd")) | |
{ | |
// Create another instance of Image class to load the secondary image with signature | |
using (Image signature = Image.Load("sample.psd")) | |
{ | |
// Create an instance of Graphics class | |
Graphics graphics = new Graphics(canvas); | |
// Call the DrawImage method while specifying the appropriate location | |
//Here the secondary image is drawn at the right bottom of the primary image | |
graphics.DrawImage(signature, new Point(canvas.Height - signature.Height, canvas.Width - signature.Width)); | |
canvas.Save("ImageSignature.png", new PngOptions()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment