ImageGear .NET v24.12 - Updated
ImGearDIB Class
Members  Example 




ImageGear24.Core Assembly > ImageGear.Core Namespace : ImGearDIB Class
Encapsulates an image, which consists of the pixel data and its attributes.
Object Model
ImGearDIB ClassImGearDIB ClassImGearColorSpace StructureImGearPixelArray ClassImGearPixelArray ClassImGearArrayRef StructureImGearPixelArray ClassImGearPixel ClassImGearArrayRef StructureImGearPixelArray ClassIImGearResolution Interface
Syntax
'Declaration
 
Public MustInherit Class ImGearDIB 
'Usage
 
Dim instance As ImGearDIB
public abstract class ImGearDIB 
public __gc abstract class ImGearDIB 
public ref class ImGearDIB abstract 
Remarks
This class does not have public constructors. Instances of ImGearDIB exist only as a member objects of ImGearPage or ImGearROIMask classes.
Example
ImGearPage igPage;
// Load an image into a ImGearPage object
using (FileStream localFile = new FileStream(localFilePath, FileMode.Open))
    igPage = ImGearFileFormats.LoadPage(localFile, 0);
// Create a black pixel appropriate to this image.
ImGearPixel igPixel = new ImGearPixel(igPage.DIB.ChannelCount,igPage.DIB.BitsPerChannel);
for (int channel = 0; channel < igPixel.ChannelCount; ++channel)
    igPixel[channel] = 0;
// Change a diagonal line across image to this igPixel.
for (int row = 0; row < igPage.DIB.Height && row < igPage.DIB.Width; ++row)
    igPage.DIB.UpdatePixelFrom(row,row,igPixel);
Dim igPage As ImGearPage
'Load an image into a ImGearPage object
Dim localFile As FileStream = New FileStream(localFilePath, FileMode.Open)
Try
    igPage = ImGearFileFormats.LoadPage(localFile, 0)
Finally
    localFile.Close()
End Try
'Create a black pixel appropiate to this image.
Dim igPixel As ImGearPixel = New ImGearPixel(igPage.DIB.ChannelCount, igPage.DIB.BitsPerChannel)
For channel As Integer = 0 To (igPixel.ChannelCount - 1)
    igPixel(channel) = 0
Next
'Change a diagonal line across image to this igPixel.
Dim shorter As Integer
If (igPage.DIB.Width < igPage.DIB.Height) Then
    shorter = igPage.DIB.Width - 1
Else
    shorter = igPage.DIB.Height - 1
End If
For row As Integer = 0 To shorter
    igPage.DIB.UpdatePixelFrom(row, row, igPixel)
Next
Inheritance Hierarchy

System.Object
   ImageGear.Core.ImGearDIB

See Also

Reference

ImGearDIB Members
ImageGear.Core Namespace