app php01 790c53caa0 最后一版uniaiim 4 månader sedan
..
dist 790c53caa0 最后一版uniaiim 4 månader sedan
es 790c53caa0 最后一版uniaiim 4 månader sedan
types 790c53caa0 最后一版uniaiim 4 månader sedan
CHANGELOG.md 790c53caa0 最后一版uniaiim 4 månader sedan
LICENSE 790c53caa0 最后一版uniaiim 4 månader sedan
README.md 790c53caa0 最后一版uniaiim 4 månader sedan
package.json 790c53caa0 最后一版uniaiim 4 månader sedan

README.md

@jimp/core

The main Jimp class. This class can be extended with types and bitmap manipulation functions. Out of the box it does not support any image type.

Available Methods

Jimp

The Jimp class constructor.

addConstants

Add constant or static methods to the Jimp constructor.

addConstants({
  MIME_SPECIAL: 'image/special'
});

addJimpMethods

Add a bitmap manipulation method to Jimp constructor. These method should return this so that the function can be chain-able.

addJimpMethods({
  cropCrazy: function() {
    // Your custom image manipulation method

    return this;
  }
})

const image = await Jimp.read(...);

image.resize(10, Jimp.AUTO),
  .cropCrazy();

await image.writeAsync('test.png');

addType

Add a image mime type to Jimp constructor. First argument is a mime type and the second is an array of file extension for that type.

addType('image/special', ['spec', 'special']);