Skip to main content

gray_page

Function gray_page 

Source
pub fn gray_page(
    doc: &PdfDocument,
    page: usize,
    dpi: u32,
) -> Result<(u32, u32, Vec<u8>)>
Expand description

Render a page to Gray8 bytes at the given dpi: (width, height, data), row-major, top-left origin, 0 is black.

The RGBA output of PdfDocument::render_page composited over white and converted to ITU-R BT.601 luma. The ONE conversion: the vision layer’s Gray8 path calls this, and the dump’s image arm reads its bytes without the vision feature (#574).