Click or drag to resize

PdfiumFPDFBitmap_CreateEx(Int32, Int32, BitmapFormats, IntPtr, Int32) Method

Create a device independent bitmap with the specified width, height, pixel format and external buffer.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDFBitmap_CreateEx(
	int width,
	int height,
	BitmapFormats format,
	IntPtr first_scan,
	int stride
)

Parameters

width  Int32
Number of pixels in a horizontal line of the bitmap. Must be greater than 0.
height  Int32
Number of pixels in a vertical line of the bitmap. Must be greater than 0
format  BitmapFormats
A number indicating for bitmap format, as defined in BitmapFormats enumeration
first_scan  IntPtr
A pointer to the first byte of first scan line, for external buffer only. If this parameter is IntPtr.Zero, then the SDK will create its own buffer.
stride  Int32
Number of bytes for each scan line, for external buffer only

Return Value

IntPtr
The created bitmap handle, or IntPtr.Zero if a parameter error or out of memory.
Remarks

Similar to FPDFBitmap_Create(Int32, Int32, Boolean) function, with support for more formats and an external buffer.

Bitmap created by this function can be used in any place that a device independent bitmap handle is required.

If external scanline buffer is used, then the application should destroy the buffer by itself. FPDFBitmap_Destroy(IntPtr) function will not destroy the buffer.

When an application is finished using the bitmap handle returned by {0} Overload, use the FPDFBitmap_Destroy(IntPtr) function to close the handle.

See Also