Title

Global

Methods

# decode(data, onlyExtractFirstFrameopt) → {Promise.<(GIF|Image)>}

Decodes the given image binary

Parameters:
Name Type Attributes Description
data Uint8Array | Buffer

The image data

onlyExtractFirstFrame boolean <optional>

Whether to end GIF decoding after the first frame

View Source ImageScript.js, line 1650

The decoded image

Promise.<(GIF|Image)>

Type Definitions

object

# PNGMetadata

Properties:
Name Type Attributes Default Description
title string <optional>

The images title

author string <optional>

The images author

description string <optional>

The images description

copyright string <optional>

The images copyright info

creationTime string | number | Date <optional>
Date.now()

The images creation timestamp

software string <optional>
"github.com/matmen/ImageScript vX.X.X"

The software used to create this image

disclaimer string <optional>

A disclaimer for the image

warning string <optional>

A warning for the image

source string <optional>

The images source

comment string <optional>

A comment for the image

View Source ImageScript.js, line 996

# colorFunction(x, y) → {number}

Parameters:
Name Type Description
x number
y number

View Source ImageScript.js, line 301

pixel color

number