Skip to main content

BitmapColorFormat Enum

Version: 3.0

BitmapColorFormat Enum

Represents Bitmap color formats.

public enum BitmapColorFormat
Public Enum BitmapColorFormat

Inheritance: Object → ValueType → Enum → BitmapColorFormat

Fields​

BitmapColorFormat.Grayscale0Color format Grayscale.
BitmapColorFormat.Monochrome1Color format Monochrome.
BitmapColorFormat.Rgb2Color format Rgb.
BitmapColorFormat.RgbA3Color format RgbA.

Licensing Info​

This enum is a DynamicPDF Rasterizer feature. One of the following is required for non-evaluation usage:

Examples​

This example demonstrates the use of BitmapColorFormat class.

Imports System
Imports ceTe.DynamicPDF.Rasterizer

Module MyModule

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

' Create a FixedImageSize object with required width,height and UnitType.
Dim fixedImageSize As FixedImageSize = New FixedImageSize(595, 841, UnitType.Point)

' Get the Bitmap.
Dim bmp As System.Drawing.Bitmap = rasterizer.Pages(0).DrawToBitmap(BitmapColorFormat.Grayscale, fixedImageSize)

' Save the image.
bmp.Save("Output.gif")

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");

// Create a FixedImageSize object with required width,height and UnitType.
FixedImageSize fixedImageSize = new FixedImageSize(595, 841, UnitType.Point);

// Get the Bitmap.
System.Drawing.Bitmap bmp = rasterizer.Pages[0].DrawToBitmap(BitmapColorFormat.Grayscale, fixedImageSize);

// Save the image.
bmp.Save("Output.gif");
}

}

See Also​

ceTe.DynamicPDF.Rasterizer