Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
Dev Center
Table of contents

Edit

DWT offers a variety of image editing features to help give you the final result you are looking for. In this section, we will explore those features and demonstrate how to use them.

All the methods on this page can be found in our API reference.

Edit options

Rotating, Flipping, and Mirroring

DWT provides methods to rotate an image right or left by 90 degrees or by the angle you specify as an input parameter. Here is an overview of the available rotate methods:

DWObject.Rotate() // rotates the specified image by the specified angle (up to 360 degrees)
DWObject.RotateEx() // similar to Rotate(), but uses the specified interpolation method to do the rotation
DWObject.RotateLeft() // rotates the specified image 90 degrees counterclockwise
DWObject.RotateRight() // rotates the specified image 90 degrees clockwise
DWObject.Flip() // flips the specified image vertically
DWObject.Mirror() // mirrors the specified image horizontally

Cutting, Cropping, and Copying

DWT can cut and copy images to the clipboard to be used later. It also has the ability to crop the image directly or save the cropped image to the clipboard. Here is an overview of the methods:

DWObject.Crop() // Crops a rectangular area from the specified image using the specified coordinates
DWObject.CropToClipboard() // Crops a rectangular area from the specified image using the input coordinates and saves to the clipboard 
DWObject.CutFrameToClipboard() // Cuts a rectangular area from the specified image using the specified coordinates to the clipboard of the operating system
DWObject.CutToClipboard() // Cuts the specified image to the clipboard of the operating system
DWObject.CopyToClipboard() // Copies the specified image to the clipboard of the operating system
DWObject.Erase() // Erases a rectangular area from the specified image using the input coordinates

Several of these methods require input coordinates to define the frame in question. DWT provides a way to visually define those coordinates to make the process as easy for the user as possible. Check out select an area.

Resizing an image

DWT also gives you the ability to resize an image in the buffer. Here is the overview of the available methods:

DWObject.ChangeImageSize() // changes the size of the specified image by altering the height and width
DWObject.SetImageWidth() // Changes the width of the specified image by adding a margin or removing part of the image

Working with pixels and bit depth

You can also change the colour and resolution of an image by altering its pixel type, bit depth, or DPI. DWT offers a number of methods to achieve this:

DWObject.ChangeBitDepth() // Changes the pixel type of the image by altering the bit depth
DWObject.SetDPI() // Changes the DPI (dots per inch) of the specified image depending on the input resolution parameters
DWObject.ConvertToBW() // Converts the specified image to a black-and-white image
DWObject.ConvertToGrayScale() // Converts the specified image to a grayscale image
DWObject.Invert() // Inverts the colour of the pixels on the specified image

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    • Version 17.2.1
    • Version 17.1.1
    • Version 17.0
    • Version 16.2
    • Version 16.1.1
    Change +
    © 2003–2022 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support