Skip to main content

ImageSize

Version: 2.0

cete.dynamicpdf.rasterizer.imagesize

ImageSize​

Base class which represents an image size.

public abstract class ImageSize
Public MustInherit Class ImageSize

Inheritance: Object → ImageSize

Derived: DpiImageSize, FixedImageSize, MaxImageSize, PercentageImageSize

Licensing​

This class is a DynamicPDF Rasterizer feature. The following license is required for non-evaluation usage:

  • DynamicPDF Rasterizer for .NET

Examples​

This This example demonstrates the usage of ImageSize class.

Imports System
Imports ceTe.DynamicPDF.Rasterizer

Module MyModule

Sub Main()

' Create a PdfRasterizer object.
Dim rasterizer As New PdfRasterizer("InputPdfFile.pdf")

' Save the image with 72 dots per inch vertical and horizontal resolution.
rasterizer.Draw("Output.gif", ImageFormat.Gif, ImageSize.Dpi72)

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

class MyClass
{
static void Main(string[] args)
{
// Create a PdfRasterizer object.
PdfRasterizer rasterizer = new PdfRasterizer("InputPdfFile.pdf");

// Save the image with 72 dots per inch vertical and horizontal resolution.
rasterizer.Draw("Output.gif", ImageFormat.Gif, ImageSize.Dpi72);
}

}

Remarks​

ImageSize's derived classes are: DpiImageSize , FixedImageSize , MaxImageSize and PercentageImageSize . See the Output Image Size topic for more on Image Sizes.

Constructors​

ImageSize()​

Initializes a new instance of the ImageSize class.

public ImageSize()
Public Sub New ()

Properties​

Dpi150​

Gets a default DpiImageSize class set to 150 DPI.

public static DpiImageSize Dpi150 { get; }
Public Shared Property Dpi150 As DpiImageSize

Property Value​

DpiImageSize

Dpi300​

Gets a default DpiImageSize class set to 300 DPI.

public static DpiImageSize Dpi300 { get; }
Public Shared Property Dpi300 As DpiImageSize

Property Value​

DpiImageSize

Dpi600​

Gets a default DpiImageSize class set to 600 DPI.

public static DpiImageSize Dpi600 { get; }
Public Shared Property Dpi600 As DpiImageSize

Property Value​

DpiImageSize

Dpi72​

Gets a default DpiImageSize class set to 72 DPI.

public static DpiImageSize Dpi72 { get; }
Public Shared Property Dpi72 As DpiImageSize

Property Value​

DpiImageSize

Dpi96​

Gets a default DpiImageSize class set to 96 DPI.

public static DpiImageSize Dpi96 { get; }
Public Shared Property Dpi96 As DpiImageSize

Property Value​

DpiImageSize

FaxFine​

Gets a default DpiImageSize class set to the fine fax DPI.

public static DpiImageSize FaxFine { get; }
Public Shared Property FaxFine As DpiImageSize

Property Value​

DpiImageSize

FaxStandard​

Gets a default DpiImageSize class set to the standard fax DPI.

public static DpiImageSize FaxStandard { get; }
Public Shared Property FaxStandard As DpiImageSize

Property Value​

DpiImageSize

FaxSuperfine​

Gets a default DpiImageSize class set to the super fine fax DPI.

public static DpiImageSize FaxSuperfine { get; }
Public Shared Property FaxSuperfine As DpiImageSize

Property Value​

DpiImageSize

HorizontalDpi​

Gets or sets the horizontal DPI of an image.

public abstract float HorizontalDpi { get; set; }
Public MustOverride Property HorizontalDpi As Single

Property Value​

Single

VerticalDpi​

Gets or sets the vertical DPI of an image.

public abstract float VerticalDpi { get; set; }
Public MustOverride Property VerticalDpi As Single

Property Value​

Single

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 .

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.Rasterizer