Skip to main content

ImageInformation

Version: 11.0

cete.dynamicpdf.merger.imageinformation

ImageInformation​

Represents image's information of an image in the document.

public class ImageInformation
Public Class ImageInformation

Inheritance: Object → ImageInformation

Properties​

BitsPerComponent​

Gets Bits Per Component number for a pixel of the image.

public int BitsPerComponent { get; }
Public Property BitsPerComponent As Int32

Property Value​

Int32

Examples​

This example show how to access BitsPerComponent of an Image

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger

Module MyModule

Sub ImageInfoBitsPerComponent(sourcePdfPath As String)

'Create PdfDocument object using the source PDF
Dim pdf As PdfDocument = New PdfDocument(sourcePdfPath)

'Get the information of all the images in the document
Dim imageInformation() As ImageInformation = pdf.GetImages()

'Read the BitsPerComponent of the images from the imageInformation array
Dim bitCount As Int64 = imageInformation(0).BitsPerComponent

End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;

public class Example
{
public static void ImageInfoBitsPerComponent(string sourcePdfPath)
{
// Create PdfDocument object using the source PDF
PdfDocument pdf = new PdfDocument(sourcePdfPath);

// Get the information of all the images in the document
ImageInformation[] imageInformation = pdf.GetImages();

// Read the BitsPerComponent of the images from the imageInformation array
int bitCount = imageInformation[0].BitsPerComponent;
}
}

HasTransperency​

Gets boolean representing alpha channels presence in the image.

public bool HasTransperency { get; }
Public ReadOnly Property HasTransperency As Boolean

Property Value​

Boolean

Height​

Gets height of the image.

public int Height { get; }
Public Property Height As Int32

Property Value​

Int32

PixelFormat​

Gets PixelFormat of the image, As PixelFormat object.

public PixelFormat PixelFormat { get; }
Public Property PixelFormat As PixelFormat

Property Value​

PixelFormat

Examples​

This example show how to access PixelFormat of an Image

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger

Module MyModule

Sub ImageInfoPixelFormat(sourcePdfPath As String)

'Create PdfDocument object using the source PDF
Dim pdf As PdfDocument = New PdfDocument(sourcePdfPath)

'Get the information of all the images in the document
Dim imageInformation() As ImageInformation = pdf.GetImages()

'Read the PixelFormat of the images from the imageInformation array
Dim pixelFormat As PixelFormat = imageInformation(0).PixelFormat
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;

public class Example
{
public static void ImageInfoPixelFormat(string sourcePdfPath)
{
// Create PdfDocument object using the source PDF
PdfDocument pdf = new PdfDocument(sourcePdfPath);

// Get the information of all the images in the document
ImageInformation[] imageInformation = pdf.GetImages();

// Read the PixelFormat of the images from the imageInformation array
PixelFormat pixelFormat = imageInformation[0].PixelFormat;
}
}

Width​

Gets width of the image.

public int Width { get; }
Public Property Width As Int32

Property Value​

Int32

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetImage()​

Returns the ExtractedImageType object for the image extracted.

public ExtractedImageData GetImage()
Function GetImage() As ExtractedImageData

Returns​

A ExtractedImageType object.

GetImage(String)​

Draws the image of type jpg or png at the given file path.

public void GetImage(string filePath)
Sub GetImage(filePath As String)

Parameters​

File path to save the image.

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF.Merger