Resource Base
Table of contents

How to stamp text & icons onto acquired images in Dynamic .NET TWAIN

Microsoft .NET Framework has its built-in method Graphics.DrawImage to add an image on another at the specified location.

Here is a simple sample in C#:

private void button2_Click(object sender, EventArgs e)
    short index = m_ImageCore.ImageBuffer.CurrentImageIndexInBuffer;
    System.Drawing.Bitmap original = m_ImageCore.ImageBuffer.GetBitmap(index);
    System.Drawing.Image icon = System.Drawing.Image.FromFile("<the path for the stamp>");
    Graphics g = Graphics.FromImage(original);
    g.DrawImage(icon, itop, ileft, iwidth, iheight);
    m_ImageCore.ImageBuffer.SetBitmap(index, original);

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    © 2003–2021 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support