ImageGear for .NET
ImGearDIB Class
Members  Example  See Also  Send Feedback
ImageGear21.Core Assembly > ImageGear.Core Namespace : ImGearDIB Class




Glossary Item Box

Encapsulates an image, which consists of the pixel data and its attributes.

Object Model

ImGearDIB ClassImGearDIB ClassImGearColorSpace StructureImGearExtraChannelInfo ClassImGearPixelArray ClassImGearPixelArray ClassImGearArrayRef StructureImGearPixelArray ClassImGearPixel ClassImGearArrayRef StructureImGearPixelArray ClassIImGearResolution InterfaceImGearRGBQuad Structure

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Remarks

This class does not have public constructors. Instances of ImGearDIB exist only as a member objects of ImGearPage or ImGearROIMask classes.

Example

C#Copy Code
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);
Visual BasicCopy Code
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

©2013. Accusoft Corporation. All Rights Reserved.