C#. Data Matrix Generator Image Setting Tutorial

sample source code to generate 2D Data Matrix in png, jpeg, etc. image formats in C# .NET


C# Data Matrix Introduction

Data Matrix, also known as Data Matrix ECC200, is great 2-dimensional matrix barcode to store different data up to 2,335 alphanumeric characters.

C# Data Matrix Generator supports adjusting the Data Matrix image settings to generate high quality Data Matrix images with various platforms in C#. Besides, C# Data Matrix allows other property settings, such as C# Data Matrix size setting, C# Data Matrix data encoding, which are just for your more professional programming.

OnBarcode C# Barcode Generator is designed to generate, create Data Matrix and other linear & 2d barcodes in Microsoft Word. Here are some more tutorials for C# Data Matrix generation concerning data encoding and size setting.

How to generate, print barcode using .NET, Java sdk library control with example project source code free download:


Generating Data Matrix by Adjusting the Image Format in C#.NET

C# Data Matrix generator is compatible with the image format setting which can supports five types of image format. They are PNG, BMP, JPEG, GIF and TIFF. You may implement the image format property to your C# .NET projects:

DataMatrix datamatrix = new DataMatrix();

datamatrix.Data = "Data-Matrix-Image-Setting";

Generating Data Matrix in PNG Format

You may set the PNG format for creation of Data Matrix images in C#.NET Class:

datamatrix.Format = ImageFormat.Png;

datamatrix.drawBarcode("c:\Data Matrix.png");

Creating Data Matrix with JPEG Format

You may set the JEPG format to output Data Matrix images in C# ASP.NET web projects:

datamatrix.Format = ImageFormat.Jpeg;

datamatrix.drawBarcode("c:\Data Matrix.jpeg");

Drawing Data Matrix in Gif Format

You may set the GIF format to generate Data Matrix images in C#.NET Windows Forms programming:

datamatrix.Format = ImageFormat.Gif;

datamatrix.drawBarcode("c:\Data Matrix.gif");

Creating Data Matrix in Tiff Format

You may set the TIFF format to draw Data Matrix images in SQL Server Reporting Service (SSRS) & Crystal Reports:

datamatrix.Format = ImageFormat.Tiff;

datamatrix.drawBarcode("c:\Data Matrix.tiff");

Creating Data Matrix in BMP Format

You may set the BMP format to create Data Matrix images in C# class.:

Data Matrix.Format = ImageFormat.Bmp;

Data Matrix.drawBarcode("c:\Data Matrix.bmp");


Rotating Data Matrix Image for C#.NET Programming

C# .NET Data Matrix image rotation setting supports rotating the generated Data Matrix image with 0, 90, 180, 270 degrees in C# projects:

DataMatrix datamatrix = new DataMatrix();

datamatrix.Data = "image-rotation";

datamatrix.Rotate = Rotate.Rotate180;


C#.NET Data Matrix Image Resolution Setting

C# .NET Data Matrix image resolution setting allows setting the resolution for the created image in C# programming:

DataMatrix datamatrix = new DataMatrix();

datamatrix.Data = "image-resolution";

datamatrix.Resolution = 200;


C#.NET Data Matrix Image Color Setting

C# .NET Data Matrix image color can be easily integrated with changing the text color, background color and bar color when generating Data Matrix in C# class:

DataMatrix datamatrix = new DataMatrix();

datamatrix.Data = "image-color";

datamatrix.BackColor = Color.Red;

datamatrix.ForeColor = Color.White;

datamatrix.TextColor = Color.Blue;


C#.NET Data Matrix Bar Alignment Setting

Besides image format, image resolution, image rotation and image color, Data Matrix Generator for C# image setting properties can set bar alignment.

DataMatrix datamatrix = new DataMatrix();

datamatrix.Data = "bar-alignment";


datamatrix.BarAlignment = AlignmentHori.Center;

When the set image width is larger than the minimum image width, Bar Alignment property can set the extra space on the left, center and right side.

OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.