Guide for VB.NET
Create New Image
Core Document Formats
Additional Features

VB.NET Imaging - Create New Image Using VB

How to Create a New Image Using VB.NET Codes in .NET Imaging Application

VB.NET
Home > .NET Imaging SDK > VB.NET > Create Image
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

VB.NET Image Creator Library Overview
RasterEdge .NET Imaging SDK provides powerful and versatile library DLLs for VB.NET developers to easily create a high quality image in various .NET applications such as Visual Basic .NET Class library and Windows Forms project. A variety of commonly used image formats are supported including bitmap, gif, png, jpeg, tiff and PSD.
  • Compatible with .NET Framework 2.0 and later
  • Perfection into Microsoft Visual Studio and above versions
  • Easy to create a new image with high-quality using VB.NET programming language
  • Support most of the commonly used raster image formats, as well as vector images
  • Complete Visual Basic .NET sample codes provided for new image creation
This page is a detailed guide with sample VB codes to show you how to create a new image in your Visual Basic .NET imaging application. Here are the sections that will be discussed in the later demo:
  • Visual Basic .NET method and sample codes for creating Bitmap in .NET project
  • Visual Basic .NET method and sample codes for creating a gif image in .NET project
  • How to Use VB method and demo codes to create a png image in .NET project
  • How to Use VB method and demo codes to create a jpeg image in .NET project
  • VB method and VB class codes for creating a TIFF image in Visual .NET image project
  • VB method and VB class codes for creating a PSD image in Visual .NET image project
How to Create Images in VB.NET
This is a detailed VB.NET sample for creating new images with RasterEdge .NET Imaging SDK. (For C#.NET developers, please go to Guide to Create New Images in C#.NET. In the following sections, you will be guided step by step to create a bitmap, gif, png, jpeg, TIFF and PSD image, along with related VB.NET methods and sample codes. To get all this started, you should download the .NET image processing package first, and then build a sample imaging application in your MS Visual Studio using VB.NET programming language.

VB.NET Method for Bitmap Creation

Listed in the code tab below is the Visual Basic .NET method for creating bitmap image in your imaging application.
Public Shared Sub New(Width As Integer, Height As Integer, PixelFormat As PixelFormat, BackColor As Color)
End Sub

VB.NET Sample Codes for Bitmap Creation

Below are the complete Visual Basic .NET sample codes for building a new bitmap image in your VB.NET image processing application such as VB.NET Class Library or VB.NET Windows Form. Please feel free to copy to your project for evaluation.
Imports System.IO
Imports System.Drawing.Printing
Imports RasterEdge.Imaging
Imports RasterEdge.Imaging.Processing

Dim Image As New RasterEdgeImaging()

Dim ResImg As Integer
ResImg = RasterEdgeImaging.CreateBitmapImage(75, 250, PixelFormat.Format24bppRgb,
RasterEdgeImaging.ARGB(255, 0, 0, 0))
Image.save("C:\1.bmp")

Method to Create GIF in VB.NET

In the following code tab we have demonstrated the Visual Basic .NET method for creating a gif image in your VB.NET image editing application.
Public Shared Sub New(Width As Integer, Height As Integer, PixelFormat As PixelFormat, BackColor As Color)
End Sub

Sample Codes to Create GIF Image

Displayed in the code tab below are the complete VB.NET sample codes for printing a high quality gif image in your VB.NET imaging program. Users can feel free to make necessary change to the codings as you wish, such as the image size, color or image file name.
Dim Image As New RasterEdgeImaging()

Dim ResImg As Integer
ResImg = RasterEdgeImaging.CreateGifImage(75, 250, PixelFormat.Format24bppRgb, RasterEdgeImaging.ARGB
(255, 0, 0, 0))
Image.save(@"C:\1.gif")

VB.NET Method for PNG Creating

Here is the VB.NET method for creating a png image with RasterEdge imaging SDK in your MS Visual Studio VB.NET program.
Public Shared Sub New(Width As Integer, Height As Integer, PixelFormat As PixelFormat, BackColor As Color)
End Sub

VB.NET Codes for PNG Creating

If you have already built a VB.NET imaging application in your Microsoft Visual Studio (2005 and above supported), you can now copy the complete VB.NET demo codes below to your program and debug to view the generated PNG image.
Dim Image As New RasterEdgeImaging()

Dim ResImg As Integer
ResImg = RasterEdgeImaging.CreatePngImage(75, 250, PixelFormat.Format24bppRgb,
RasterEdgeImaging.ARGB(255, 0, 0, 0))
Image.save(@"C:\1.png")

JPEG Creation VB.NET Method

Listed below is the VB.NET method for generating a jpeg image in your program. You can customize settings like image color and size according to your requirements.
Public Shared Sub New(Width As Integer, Height As Integer, PixelFormat As PixelFormat, BackColor As Color)
End Sub

JPEG Creation VB.NET Demo Codes

Please feel free to copy the Visual Basic .NET demo codes to your program so you can easily create a JPEG image / picture with high quality and fast speed.
Dim Image As New RasterEdgeImaging()

Dim ResImg As Integer
ResImg = RasterEdgeImaging.CreateJpegImage(75, 250, PixelFormat.Format24bppRgb,
RasterEdgeImaging.ARGB(255, 0, 0, 0))
Image.save(@"C:\1.jpg")

Method for TIFF VB.NET Creation

Similar to other image format, listed below is the Visual Basic .NET method for creating a tiff image with RasterEdge image processing library component.
Public Shared Sub New(Width As Integer, Height As Integer, PixelFormat As PixelFormat, BackColor As Color)
End Sub

Sample Codes for TIFF VB.NET Creation

Please copy the following VB.NET sample codes to your program to create a TIFF image.
Dim Image As New RasterEdgeImaging()

Dim ResImg As Integer
ResImg = RasterEdgeImaging.CreateTiffImage(75, 250, PixelFormat.Format24bppRgb, RasterEdgeImaging.ARGB
(255, 0, 0, 0))
Image.save(@"C:\1.tif")

Creating PSD with VB.NET Method

Please use the following method to create a new PSD image.
Public Shared Sub New(Width As Integer, Height As Integer, PixelFormat As PixelFormat, BackColor As Color)
End Sub

Creating PSD with VB.NET Codes

Here is an example for creating a new PSD image using the above method.
Dim Image As New RasterEdgeImaging()

Dim ResImg As Integer
ResImg = RasterEdgeImaging.CreatePsdImage(75, 250, PixelFormat.Format24bppRgb,
RasterEdgeImaging.ARGB(255, 0, 0, 0))
Image.save(@"C:\1.psd")


Recommend this to Google+