pub struct PdfBitmap<'a> { /* private fields */ }
Expand description

A rendered image of a single PdfPage at a specific width and height.

By default, PdfBitmap is lazy; it will not render its page into a bitmap until it is required to do so in order to return a byte buffer or a DynamicImage. If preferred, rendering can be initiated manually by calling the PdfBitmap::render() function. Once rendered, the page will not be re-rendered.

Implementations

Returns the width of the image in this PdfBitmap, in pixels.

Returns the height of the image in this PdfBitmap, in pixels.

Returns the pixel format of the image in this PdfBitmap.

Returns a new DynamicImage created from the bitmap buffer backing this PdfBitmap, rendering the referenced page if necessary.

Returns an immutable reference to the bitmap buffer backing this PdfBitmap, rendering the referenced page if necessary.

Renders this page into a bitmap buffer. Once rendered, the page will not be re-rendered.

It is generally unnecessary to call this function directly, since PdfBitmap will automatically initiate rendering itself on the first call to either the PdfBitmap::as_bytes() function or the PdfBitmap::as_image() function.

Trait Implementations

Closes the PdfPage, releasing the memory held by the bitmap buffer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.