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

How to rotate video

This KB is for Dynamic .NET TWAIN v7.x and higher only.

Dynamic .NET TWAIN offers an event named OnFrameCaptrue which is triggered when a frame is captured by the camera. You can set some preview features with that.

Following is the sample code for rotating the video:

private void Rotate_Click(object sender, EventArgs e)
 {
 m_CurrentCamera.RotateVideo(Dynamsoft.UVC.Enums.EnumVideoRotateType.Rotate_180);
 m_CurrentCamera.OnFrameCaptrue += M_CurrentCamera_OnFrameCaptrue;
  
 }
 int i = 0;
 private void SetPicture(Image img)
 {
 Bitmap temp = ((Bitmap)(img)).Clone(new Rectangle(0, 0, img.Width, img.Height), img.PixelFormat);
 if (pictureBox2.InvokeRequired)
 {
 pictureBox2.BeginInvoke(new MethodInvoker(
 delegate ()
 {
 pictureBox2.Image = temp;
 if (i == 0)
 {
 m_ImageCore.IO.LoadImage(temp);
 i++;
 }
 
 }));
 }
 else
 {
 pictureBox2.Image = temp;
 }
 }
 private void M_CurrentCamera_OnFrameCaptrue(Bitmap bitmap)
 {
 SetPicture(bitmap);
 //pictureBox2.Image = bitmap; // If you use this API directly, the app will throw an exception. 
 }

You can also set other customized settings like adding grids.

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

In this article:

latest version

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