ExPdfium.Bitmap (ExPdfium v0.2.0)

Copy Markdown View Source

A rendered page bitmap.

data is a raw pixel buffer. pdfium renders natively as BGRA (8 bits per channel); format records the actual byte order so consumers can convert. With width, height, and stride (bytes per row), the buffer feeds directly into e.g. Vix.Vips.Image.new_from_binary/5.

Summary

Types

format()

@type format() :: :bgra | :rgba

t()

@type t() :: %ExPdfium.Bitmap{
  data: binary(),
  format: format(),
  height: non_neg_integer(),
  stride: non_neg_integer(),
  width: non_neg_integer()
}