Module C2d.Image_data
Image data objects
type t
The type for ImageData objects.
val create : ?data:Brr.Tarray.uint8_clamped -> w:int -> h:int -> t
create ~data ~w ~h
is the image datadata
for an image of widthw
and heighth
. Ifdata
is unspecified it is created as a transparent black rectangle. Raises ifdata
is specified and its length is not4 * w * h
.
val w : t -> int
w d
is the image data width.
val h : t -> int
h d
is the image data height.
val data : t -> Brr.Tarray.uint8_clamped
data d
is the image data of size4 * w d * h d
.