meo-skia-canvas
    Preparing search index...

    Interface ImageDataSettings

    How to interpret the bytes of a pixel buffer being read in.

    interface ImageDataSettings {
        colorSpace?: ColorSpace;
        colorType?: ColorType;
    }
    Index
    colorSpace?: ColorSpace

    Color space the pixel data is in, defaulting to "srgb".

    Every name in the ColorSpace union is accepted, and one that is not throws a TypeError at construction rather than later inside a draw. The space is metadata about the buffer, not a conversion: nothing is resampled to match it.

    colorType?: ColorType

    Layout of the bytes in data, defaulting to "rgba".

    Determines ImageData.bytesPerPixel and so how data is walked. A buffer passed to the constructor must be long enough for the dimensions at that format, or the call throws.