package brr

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Image data objects

type t

The type for ImageData objects.

val create : ?data:Brr.Tarray.uint8_clamped -> w:int -> h:int -> unit -> t

create ~data ~w ~h () is the image data data for an image of width w and height h. If data is unspecified it is created as a transparent black rectangle. Raises if data is specified and its length is not 4 * w * h.

val w : t -> int

w d is the image data width.

val h : t -> int

h d is the image data height.

data d is the image data of size 4 * w d * h d.