Skip to main content

ImageInformation3D

Version: 12.0

cete.dynamicpdf.merger.imageinformation3d

ImageInformation3D​

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

public class ImageInformation3D
Public Class ImageInformation3D

Inheritance: Object → ImageInformation3D

Licensing Info​

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example shows accessing the 3D image information from a PDF document.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule

Sub Main()

' Create a PdfdDocument object using the source pdf document
Dim MyPdfDocument As PdfDocument = New PdfDocument(inputFilePath)

' Get the 3D information from the pdfDocument
Dim MyImageInfoList() As ImageInformation3D = MyPdfDocument.Get3DImages()
Dim i As Int32
For i = 0 To imageInfoList.Length - 1

' Set the Extracted3DImageData to Get3DImage() method from the MyImageInfoList
Dim MyExtracted3DImageData As Extracted3DImageData = MyImageInfoList(i).Get3DImage()

' Get the Width
Dim width As Int32 = MyImageInfoList(i).Width

' Get the Height
Dim height As Int32 = MyImageInfoList(i).Height

' Get the BitsPerComponent
Dim bitPerPixel As Int32 = MyImageInfoList(i).BitsPerComponent

' Get the PixelFormat
Dim pixFormat As PixelFormat = MyImageInfoList(i).PixelFormat

' Gets true if the image info list has transperency
Dim trans As Boolean = MyImageInfoList(i).HasTransperency

Dim extension As String = ".u3d"
If (MyExtracted3DImageData.ImageType3D = Extracted3DImageType.U3D) Then
extension = ".u3d"
Else
extension = ".prc"
End If

MyImageInfoList(i).Get3DImage(("MyImage" + (i + 1).ToString() + extension), False)

' Set the ExtractedImageData to GetPosterImage() method from the MyImageInfoList
Dim extractedImageData As ExtractedImageData = MyImageInfoList(i).GetPosterImage()
Dim baseData() As Byte

Dim baseExtension As String = ""
If (extractedImageData.ImageType = ExtractedImageType.Jpeg) Then
baseExtension = ".jpg"
Else
baseExtension = ".png"
End If
baseData = extractedImageData.Data
Dim outputPath1 As String = ("BaseImage" + (i + 1).ToString() + baseExtension)

'Save the output
File.WriteAllBytes(outputPath1, baseData)
Next


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

public class Example
{
public static void CreatePDF(string outputPath, string inputFilePath)
{
// Create a PdfdDocument object using the source pdf document
PdfDocument pdfDocument = new PdfDocument(inputFilePath);

// Get the 3D information from the pdfDocument
ImageInformation3D[] imageInfoList = pdfDocument.Get3DImages();

for (int i = 0; i < imageInfoList.Length; i++)
{
// Set the Extracted3DImageData to Get3DImage() method from the imageInfoList
Extracted3DImageData extracted3DImageData = imageInfoList[i].Get3DImage();

// Get the Width
int width = imageInfoList[i].Width;

// Get the Height
int height = imageInfoList[i].Height;

//Get the BitsPerComponent
int bitPerPixel = imageInfoList[i].BitsPerComponent;

// Get the PixelFormat
PixelFormat pixFormat = imageInfoList[i].PixelFormat;

// Gets true if the image info list has transperency
bool trans = imageInfoList[i].HasTransperency;

string extension = ".u3d";
if (extracted3DImageData.ImageType3D == Extracted3DImageType.U3D)
extension = ".u3d";
else
extension = ".prc";

imageInfoList[i].Get3DImage(("MyImage" + (i + 1) + extension), false);

// Set the ExtractedImageData to GetPosterImage() method from the imageInfoList
ExtractedImageData extractedImageData = imageInfoList[i].GetPosterImage();
byte[] baseData = null;
string baseExtension = "";
if (extractedImageData.ImageType == ExtractedImageType.Jpeg)
baseExtension = ".jpg";
else
baseExtension = ".png";
baseData = extractedImageData.Data;
string outputPath1 = ("BaseImage" + (i + 1) + baseExtension);

// Save the output
File.WriteAllBytes(outputPath1, baseData);
}
}
}

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

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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 ImageInformation3D = pdf.Get3DImages()

'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
ImageInformation3D[] imageInformation = pdf.Get3DImages();

// 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 Property HasTransperency As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Height​

Gets height of the image.

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

Property Value​

Int32

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PixelFormat​

Gets PixelFormat of the image, As PixelFormat object.

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

Property Value​

PixelFormat

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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 ImageInformation3D = pdf.Get3DImages()

'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
ImageInformation3D[] imageInformation = pdf.Get3DImages();

// 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

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Get3DImage()​

Returns the Extracted3DImageData object for the image extracted.

public Extracted3DImageData Get3DImage()
Function Get3DImage() As Extracted3DImageData

Returns​

A Extracted3DImageData object.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Get3DImage(String, [Optional] Boolean)​

Draws the 3D image at the given file path.

public void Get3DImage(string filePath, [bool addFileExtension = True])
Sub Get3DImage(filePath As String, Optional addFileExtension As Boolean = True)

Parameters​

File path to save the image.

The boolean indicating whether to add file extension, Defualt is True.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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 .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetPosterImage()​

Returns the ExtractedImageType object for the image extracted.

public ExtractedImageData GetPosterImage()
Function GetPosterImage() As ExtractedImageData

Returns​

A ExtractedImageType object.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetPosterImage(String)​

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

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

Parameters​

File path to save the image.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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 .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF.Merger