'Create an instance of ImageElement class
Dim imgElem As New Neodynamic.WebControls.ImageDraw.ImageElement
'Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.File
'Set an Absolute URL
imgElem.SourceFile = "http://www.domain.com/imageSample.jpg"
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = new Neodynamic.WebControls.ImageDraw.ImageElement();
//Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.File;
//Set an Absolute URL
imgElem.SourceFile = "http://www.domain.com/imageSample.jpg";
'Create an instance of ImageElement class
Dim imgElem As New Neodynamic.WebControls.ImageDraw.ImageElement
'Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.File
'Set a Relative URL
imgElem.SourceFile = "~/images/imageSample.jpg"
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = new Neodynamic.WebControls.ImageDraw.ImageElement();
//Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.File;
//Set a Relative URL
imgElem.SourceFile = "~/images/imageSample.jpg";
'Create an instance of ImageElement class
Dim imgElem As New Neodynamic.WebControls.ImageDraw.ImageElement
'Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.File
'Set a path file
imgElem.SourceFile = "C:\Projects\Images\imageSample.jpg"
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = new Neodynamic.WebControls.ImageDraw.ImageElement();
//Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.File;
//Set a path file
imgElem.SourceFile = @"C:\Projects\Images\imageSample.jpg";
'Create an instance of ImageElement class
Dim imgElem As New Neodynamic.WebControls.ImageDraw.ImageElement
'Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Base64String
'Set the Base64 string representing the binary content of the image
imgElem.SourceBase64 = "THE BASE64 STRING HERE..."
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = new Neodynamic.WebControls.ImageDraw.ImageElement();
//Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Base64String;
//Set the Base64 string representing the binary content of the image
imgElem.SourceBase64 = "THE BASE64 STRING HERE...";
'Create an instance of ImageElement class
Dim imgElem As New Neodynamic.WebControls.ImageDraw.ImageElement
'Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Binary
'Set the binary content of the image
imgElem.SourceBinary = ...Byte Array
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = new Neodynamic.WebControls.ImageDraw.ImageElement();
//Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Binary;
//Set the binary content of the image
imgElem.SourceBinary = ...Byte Array;
'Create an instance of ImageElement class
Dim imgElem As New Neodynamic.WebControls.ImageDraw.ImageElement
'Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Image
'Set the source image object
imgElem.SourceImage = New System.Drawing.Bitmap(100, 50)
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = new Neodynamic.WebControls.ImageDraw.ImageElement();
//Set the source property
imgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Image;
//Set the source image object
imgElem.SourceImage = new System.Drawing.Bitmap(100, 50);
'Create an instance of ImageElement class using Shared method
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("http://www.domain.com/imageSample.jpg")
//Create an instance of ImageElement class using static method
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("http://www.domain.com/imageSample.jpg");
'Create an instance of ImageElement class using Shared method
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement = Neodynamic.WebControls.ImageDraw.ImageElement.FromFile("C:\Projects\Images\imageSample.jpg")
//Create an instance of ImageElement class using static method
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromFile("C:\Projects\Images\imageSample.jpg");
'Create an instance of ImageElement class using Shared method
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement = Neodynamic.WebControls.ImageDraw.ImageElement.FromBase64("THE BASE64 STRING HERE...")
//Create an instance of ImageElement class using static method
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromBase64("THE BASE64 STRING HERE...");
'Create an instance of ImageElement class using Shared method
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement = Neodynamic.WebControls.ImageDraw.ImageElement.FromImage(Byte Array)
//Create an instance of ImageElement class using static method
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromBinary(Byte Array);
'Create an instance of ImageElement class using Shared method
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement = Neodynamic.WebControls.ImageDraw.ImageElement.FromImage(New System.Drawing.Bitmap(100, 50))
//Create an instance of ImageElement class using static method
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromImage(new System.Drawing.Bitmap(100, 50));
The ImageElement object can wrap and manage the following image formats:
PNG, or Portable Network Graphic, is a versatile web graphic format that can support up to 32-bit color, contain transparency or an alpha channel.
GIF, or Graphics Interchange Format, is a popular web graphic format for cartoons, logos, and graphics with transparent areas. GIFs contain a maximum of 256 colors.
JPG/JPEG was developed by the Joint Photographic Experts Group specifically for photographic or high-color images. The JPEG format is best for digital or scanned photographs, images using textures, images with gradient color transitions, and any images that require more than 256 colors.
BMP or Bit Mapped format is used internally in the Microsoft Windows operating system to handle graphics images. These files are typically not compressed resulting in large files.
TIFF or Tagged Image File Format, is a flexible image format that normally uses a filename extension of TIFF or TIF
WMF or Windows Metafile, is a graphics file format on Microsoft Windows systems. WMF file stores a list of function calls that have to be issued to the Windows graphics layer GDI in order to restore the image.
EMF or Enhanced Metafile, is a newer 32-bit version of WMF with additional commands.
ICO file format is an image file format used for icons in Microsoft Windows.
The image or picture -wrapped by ImageElement objects- can be acquired from several sources such as a URL or path file, Base64 string, byte array, or System.Drawing.Image object. The following points describe in details each source and their settings.
Base64 string
An ImageElement will be created by acquiring the image or picture from the specified Base64 string. This kind of sources can be found when dealing with XML documents or WebServices - because binary data is Base64 encoded in those scenarios.
Syntax samples:
Byte Array – Binary content
An ImageElement will be created by acquiring the image or picture from the specified byte array. The most common scenario for this kind of sources is found when dealing with images stored in a BLOB (Binary Large Object) field of SQL Server database tables.
Syntax samples:
GDI+ Image Object
An ImageElement will be created by acquiring the image or picture from the specified System.Drawing.Image object.
Most time, ImageElement objects will require some "retouching" such as resizing, scaling, FX effects and so on. An ImageElement can be "affected" by more than one Action because ImageElement objects feature an Actions property of type Neodynamic.WebControls.ImageDraw.ActionCollection.