BitmapColorFormat Enum
- Namespace: ceTe.DynamicPDF.Rasterizer
- Assemblies: ceTe.DynamicPDF.Rasterizer.dll
Represents Bitmap color formats.
public enum BitmapColorFormat
Public Enum BitmapColorFormat
Inheritance: Object → ValueType → Enum → BitmapColorFormat
Fields
| BitmapColorFormat.Grayscale | 0 | Color format Grayscale. |
|---|---|---|
| BitmapColorFormat.Monochrome | 1 | Color format Monochrome. |
| BitmapColorFormat.Rgb | 2 | Color format Rgb. |
| BitmapColorFormat.RgbA | 3 | Color format RgbA. |
Licensing
This class is a DynamicPDF Rasterizer feature. The following license is required for non-evaluation usage:
- DynamicPDF Rasterizer for .NET
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");
}
}