open-index/open-npm huggingface dataset:
npm package: @my-jimp/bmp
Description: Default hekerman bmp encoder/decoder.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/bmp</h1>
  <p>Default Jimp bmp encoder/decoder.</p>
</div>
npm package: @my-jimp/cli
Description: jimp on the cli
Latest version: 0.16.11

<div align="center">
  <a href="https://intuit.github.io/Ignite/">
    <img width="200" height="200"
      src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  </a>
  <h1>@jimp/cli</h1>
  <p>jimp on the cli</p>
</div>

Jimp on the CLI.

## Usage

Run with `--help` to get help information. Further help by running `--help <command>`. The two main functions are `read` and `create`.

```sh
jimp <command>

Commands:
  jimp read [img]              Read and image into jimp. (PNG, JPEG, TIFF, BMP, or GIF)
  jimp create                  Create a new image
  jimp distance [img1] [img2]  Calculates the hamming distance of two images based on their
                               perceptual hash
  jimp diff [img1] [img2]      Diffs two images
  jimp rgbaToInt               A static helper method that converts RGBA values to a single
                               integer value. args: r, g, b, a (0 - 255)
  jimp intToRGBA               A static helper method that converts RGBA values to a single
                               integer value. args: num (eg 0xFF0000FF)
  jimp cssColorToHex           Converts a css color (Hex, 8-digit (RGBA) Hex, RGB, RGBA, HSL,
                               HSLA, HSV, HSVA, Named) to a hex number
  jimp limit255                Limits a number to between 0 or 255. args: num
  jimp compareHashes           Calculates the hamming distance of two images based on their
                               perceptual hash. args: hash1, hash2
  jimp colorDiff               Compute color difference. args: color1, color2 ({r:val, g:val,
                               b:val, a:val})
  jimp measureText             Measure how wide printing a string will be. args: text
  jimp measureTextHeight       Measure how tall printing a string will be. args: text, width

Jimp Configuration:
  --plugins, -p   Jimp plugins to load.                                                  [array]
  --types, -t     Jimp types to load.                                                    [array]
  --loadFont, -f  Path of font to load and be used in text operations                   [string]

Options:
  --help         Show help                                                             [boolean]
  --version      Show version number                                                   [boolean]
  --verbose, -v  enable more logging                                                   [boolean]

Examples:
  jimp read path/to/image.png --output output.jpg  Convert images from one type to another. See
                                                   more under jimp read --help
```
npm package: @my-jimp/core
Description: Jimp core
Author: Oliver Moran
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/core</h1>
</div>

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.

```js
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.

```js
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.

```js
addType('image/special', ['spec', 'special']);
```
npm package: @my-jimp/gif
Description: Default hekerman gif encoder/decoder.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/gif</h1>
  <p>Default Jimp gif decoder.</p>
</div>

NOTE: Encoder currently unavailable.
npm package: @my-jimp/jpeg
Description: Default hekerman jpeg encoder/decoder.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/jpeg</h1>
  <p>Default Jimp jpeg encoder/decoder.</p>
</div>

## Available Methods

### Jimp.quality

Sets the quality of the image when saving as JPEG format (default is 100)
npm package: @my-jimp/plugin-blit
Description: Blit an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-blit</h1>
  <p>Blit an image.</p>
</div>

> Blit - a data operation commonly used in computer graphics in which several bitmaps are combined into one using a boolean function.

## Usage

Blits a source image on to this image

- @param {Jimp} src image to blit
- @param {number} x the x position to blit the image
- @param {number} y the y position to blit the image
- @param {number} srcx (optional) the x position from which to crop the source image
- @param {number} srcy (optional) the y position from which to crop the source image
- @param {number} srcw (optional) the width to which to crop the source image
- @param {number} srch (optional) the height to which to crop the source image
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');
  const parrot = await jimp.read('test/party-parrot.png');

  image.blit(parrot, x, y);
}

main();
```
npm package: @my-jimp/plugin-blur
Description: blur an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-blur</h1>
  <p>Blur an image.</p>
</div>

A fast blur algorithm that produces similar effect to a Gaussian blur - but MUCH quicker

## Usage

- @param {number} r the pixel radius of the blur
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.blur(5);
}

main();
```
npm package: @my-jimp/plugin-circle
Description: Creates a circle out of an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-circle</h1>
  <p>Creates a circle out of an image.</p>
</div>

## Usage

- @param {function(Error, Jimp)} options (optional) radius, x, y
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.circle();
  // or
  image.circle({ radius: 50, x: 25, y: 25 });
}

main();
```
npm package: @my-jimp/plugin-contain
Description: contain an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-contain</h1>
  <p>Contain an image within a height and width.</p>
</div>

Scale the image to the given width and height keeping the aspect ratio. Some parts of the image may be letter boxed.

## Usage

- @param {number} w the width to resize the image to
- @param {number} h the height to resize the image to
- @param {number} alignBits (optional) A bitmask for horizontal and vertical alignment
- @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.contain(150, 100);
}

main();
```

### Align modes

The following constants can be passed to `image.contain`:

```js
Jimp.HORIZONTAL_ALIGN_LEFT;
Jimp.HORIZONTAL_ALIGN_CENTER;
Jimp.HORIZONTAL_ALIGN_RIGHT;

Jimp.VERTICAL_ALIGN_TOP;
Jimp.VERTICAL_ALIGN_MIDDLE;
Jimp.VERTICAL_ALIGN_BOTTOM;
```

For example:

```js
image.contain(250, 250, Jimp.HORIZONTAL_ALIGN_LEFT | Jimp.VERTICAL_ALIGN_TOP);
image.contain(
  250,
  250,
  Jimp.HORIZONTAL_ALIGN_RIGHT | Jimp.VERTICAL_ALIGN_BOTTOM
);
```

Default align mode for `image.contain` is:

```js
Jimp.HORIZONTAL_ALIGN_CENTER | Jimp.VERTICAL_ALIGN_MIDDLE;
```
npm package: @my-jimp/plugin-cover
Description: cover an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-cover</h1>
</div>

Scale the image so the given width and height keeping the aspect ratio. Some parts of the image may be clipped.

## Usage

- @param {number} w the width to resize the image to
- @param {number} h the height to resize the image to
- @param {number} alignBits (optional) A bitmask for horizontal and vertical alignment
- @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.cover(150, 100);
}

main();
```

### Align modes

The following constants can be passed to `image.cover`:

```js
Jimp.HORIZONTAL_ALIGN_LEFT;
Jimp.HORIZONTAL_ALIGN_CENTER;
Jimp.HORIZONTAL_ALIGN_RIGHT;

Jimp.VERTICAL_ALIGN_TOP;
Jimp.VERTICAL_ALIGN_MIDDLE;
Jimp.VERTICAL_ALIGN_BOTTOM;
```

For example:

```js
image.cover(250, 250, Jimp.HORIZONTAL_ALIGN_LEFT | Jimp.VERTICAL_ALIGN_TOP);
image.cover(250, 250, Jimp.HORIZONTAL_ALIGN_RIGHT | Jimp.VERTICAL_ALIGN_BOTTOM);
```

Default align mode for `image.cover` is:

```js
Jimp.HORIZONTAL_ALIGN_CENTER | Jimp.VERTICAL_ALIGN_MIDDLE;
```
npm package: @my-jimp/plugin-crop
Description: crop an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-crop</h1>
  <p>Crop an image.</p>
</div>

## Crop

Crops the image at a given point to a give size

- @param {number} x the x coordinate to crop form
- @param {number} y the y coordinate to crop form
- @param w the width of the crop region
- @param h the height of the crop region
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.crop(150, 150);
}

main();
```

## AutoCrop

AutoCrop same color borders from this image

- @param {number} tolerance (optional): a percent value of tolerance for pixels color difference (default: 0.0002%)
- @param {boolean} cropOnlyFrames (optional): flag to crop only real frames: all 4 sides of the image must have some border (default: true)

or

- @param {object} options object
  - tolerance (optional): a percent value of tolerance for pixels color difference (default: 0.0002%)
  - cropOnlyFrames (optional): flag to crop only real frames: all 4 sides of the image must have some border (default: true)
  - cropSymmetric (optional): flag to force cropping top be symmetric. north and south / east and west are cropped by the same value
  - leaveBorder (optional): integer of how many pixels of the background color to leave around the image

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.autocrop();
  image.autocrop({ cropOnlyFrames: false, cropSymmetric: true });
}

main();
```
npm package: @my-jimp/plugin-displace
Description: displace an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-displace</h1>
  <p>Displace an image.</p>
</div>

Displaces the image based on the provided displacement map

## Usage

- @param {object} map the source Jimp instance
- @param {number} offset the maximum displacement value
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  // Make me better!
  image.displace(map, 10);
}

main();
```
npm package: @my-jimp/plugin-dither
Description: Dither an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-dither</h1>
  <p>Apply a dither effect to an image.</p>
</div>

> Dither - is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is often one of the last stages of mastering audio to a CD.

## Usage

Apply a ordered dithering effect

- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.dither565();
}

main();
```
npm package: @my-jimp/plugin-fisheye
Description: Apply a fisheye effect to an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-fisheye</h1>
  <p>Apply a fisheye effect to an image</p>
</div>

## Usage

- @param {function(Error, Jimp)} options (optional) radius
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.fisheye();
  // or
  image.fisheye({ r: 1.6 });
}

main();
```

Produces nice images with [@jimp/plugin-circle](../plugin-circle).
npm package: @my-jimp/plugin-flip
Description: flip an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-flip</h1>
  <p>flip an image.</p>
</div>

Flip the image horizontally or vertically. Defaults to horizontal.

Also aliased as `mirror`

## Usage

- @param {boolean} horizontal a Boolean, if true the image will be flipped horizontally
- @param {boolean} vertical a Boolean, if true the image will be flipped vertically
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.flip();
  image.mirror();
  image.flip(false, true);
}

main();
```
npm package: @my-jimp/plugin-gaussian
Description: gaussian blur an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-gaussian</h1>
  <p>Gaussian blur an image.</p>
</div>

Applies a true Gaussian blur to the image (warning: this is VERY slow)

## Usage

- @param {number} r the pixel radius of the blur
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.gaussian(15);
}

main();
```
npm package: @my-jimp/plugin-invert
Description: invert an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-invert</h1>
  <p>Invert an image's colors.</p>
</div>

Invert an image's colors.

## Usage

- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.invert();
}

main();
```
npm package: @my-jimp/plugin-mask
Description: mask an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-mask</h1>
  <p>mask an image with another image.</p>
</div>

Masks a source image on to this image using average pixel colour. A completely black pixel on the mask will turn a pixel in the image completely transparent.

## Usage

- @param {Jimp} src the source Jimp instance
- @param {number} x the horizontal position to blit the image
- @param {number} y the vertical position to blit the image
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');
  const mask = await jimp.read('test/mask.png');

  image.mask(mask);
}
```
npm package: @my-jimp/plugin-normalize
Description: normalize an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-normalize</h1>
  <p>Normalize an image's colors.</p>
</div>

Normalizes an images color by computing a histogram.

## Usage

- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.normalize();
}

main();
```
npm package: @my-jimp/plugin-resize
Description: Resize an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-resize</h1>
  <p>Resize an image.</p>
</div>

Resizes the image to a set width and height using a 2-pass bilinear algorithm/

## Usage

- @param {number} w the width to resize the image to (or Jimp.AUTO)
- @param {number} h the height to resize the image to (or Jimp.AUTO)
- @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
	// Read the image.
	const image = await jimp.read('test/image.png');

	// Resize the image to width 150 and auto height.
	await image.resize(150, jimp.AUTO);

	// Save and overwrite the image
	await image.writeAsync('test/image.png');
}

main();
```

## Auto

`Jimp.AUTO` can be passes to either the height or width and jimp will scale the image accordingly. `Jimp.AUTO` cannot be both height and width.

```js
// resize the height to 250 and scale the width accordingly
image.resize(Jimp.AUTO, 250);
// resize the width to 250 and scale the height accordingly
image.resize(250, Jimp.AUTO);
```

### Resize modes

The default resizing algorithm uses a bilinear method.

Optionally, the following constants can be passed to choose a particular resizing algorithm:

```js
Jimp.RESIZE_NEAREST_NEIGHBOR;
Jimp.RESIZE_BILINEAR;
Jimp.RESIZE_BICUBIC;
Jimp.RESIZE_HERMITE;
Jimp.RESIZE_BEZIER;
```

```js
image.resize(250, 250, Jimp.RESIZE_BEZIER);
```
npm package: @my-jimp/plugin-rotate
Description: Rotate an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-rotate</h1>
  <p>Rotate an image.</p>
</div>

Rotates the image clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.

## Usage

- @param {number} deg the number of degrees to rotate the image by
- @param {string|boolean} mode (optional) resize mode or a boolean, if false then the width and height of the image will not be changed
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.rotate(90);
}

main();
```
npm package: @my-jimp/plugin-scale
Description: scale an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-scale</h1>
  <p>Scale an image.</p>
</div>

## scale

Uniformly scales the image by a factor.

- @param {number} f the factor to scale the image by
- @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.scale(2);
  image.scale(2, jimp.RESIZE_BEZIER);
}

main();
```

## scaleToFit

Scale the image to the largest size that fits inside the rectangle that has the given width and height.

- @param {number} w the width to resize the image to
- @param {number} h the height to resize the image to
- @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.scaleToFit(100, 100);
}

main();
```
npm package: @my-jimp/plugin-shadow
Description: Creates a shadow on an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-shadow</h1>
  <p>Creates a shadow on an image.</p>
</div>

## Usage

- @param {function(Error, Jimp)} options (optional)
  - opacity - opacity of the shadow between 0 and 1
  - size,- of the shadow
  - blur - how blurry the shadow is
  - x - x position of shadow
  - y - y position of shadow
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.shadow();
  // or
  image.shadow({ opacity: 0.8, size: 1.2, blur: 10, x: -75, y: -75 });
}

main();
```
npm package: @my-jimp/plugin-threshold
Description: Lightens an image.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugin-threshold</h1>
  <p>Lightens an image.</p>
</div>

This is useful as a simplified method for processing scanned drawings, signatures, etc

## Usage

- @param {number} options object
  - max: A number auto limited between 0 - 255
  - replace: (optional) A number auto limited between 0 - 255 (default 255)
  - autoGreyscale: (optional) A boolean whether to apply greyscale beforehand (default true)
- @param {function(Error, Jimp)} cb (optional) a callback for when complete

```js
import jimp from 'jimp';

async function main() {
  const image = await jimp.read('test/image.png');

  image.threshold({ max: 150 });
  // or
  image.threshold({ max: 200, replace: 200, autoGreyscale: false });
}

main();
```
npm package: @my-jimp/plugins
Description: Default hekerman plugin.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/plugins</h1>
  <p>Default Jimp plugins.</p>
</div>

## Included Plugins

- [blit](../plugin-blit)
- [blur](../plugin-blur)
- [color](../plugin-color)
- [contain](../plugin-contain)
- [cover](../plugin-cover)
- [displace](../plugin-displace)
- [dither](../plugin-dither)
- [flip](../plugin-flip)
- [gaussian](../plugin-gaussian)
- [invert](../plugin-invert)
- [mask](../plugin-mask)
- [normalize](../plugin-normalize)
- [print](../plugin-print)
- [resize](../plugin-resize)
- [rotate](../plugin-rotate)
- [scale](../plugin-scale)
npm package: @my-jimp/png
Description: Default hekerman png encoder/decoder.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/png</h1>
  <p>Default Jimp png encoder/decoder.</p>
</div>

## Available Methods

### Jimp.deflateLevel

Sets the deflate level used when saving as PNG format (default is 9)

### Jimp.deflateStrategy

Sets the deflate strategy used when saving as PNG format (default is 3)

### Jimp.filterType

Sets the filter type used when saving as PNG format (default is automatic filters)

### Jimp.colorType

Sets the color type used when saving as PNG format (one of 0, 2, 4, 6)

### Filter Types

```js
Jimp.PNG_FILTER_AUTO;
Jimp.PNG_FILTER_NONE;
Jimp.PNG_FILTER_SUB;
Jimp.PNG_FILTER_UP;
Jimp.PNG_FILTER_AVERAGE;
Jimp.PNG_FILTER_PATH;
```
npm package: @my-jimp/test-utils
Description: Test utils for hekerman extensions.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/utils</h1>
  <p>Utils for jimp extensions.</p>
</div>

## Available Methods

### isNodePattern

Determines if function was passed an node callback.

```js
if (isNodePattern(cb)) {
  cb.call(this, null, this);
}
```

### throwError

Either throws the error or calls the callback with the error.

```js
if (/* check for error */) {
  return throwError.call(this, 'someError', cb);
}
```

### scan

Scans through a region of the bitmap, calling a function for each pixel.

```js
function removeRed(image) {
  return scan(image, 0, 0, image.bitmap.width, image.bitmap.height, function(
    x,
    y,
    index
  ) {
    const red = this.bitmap.data[index + 0];
    const green = this.bitmap.data[index + 1];
    const blue = this.bitmap.data[index + 2];
    const alpha = this.bitmap.data[index + 3];

    this.bitmap.data[index + 0] = 0;
    this.bitmap.data[index + 1] = green;
    this.bitmap.data[index + 2] = blue;
    this.bitmap.data[index + 3] = alpha;
  });
}
```
npm package: @my-jimp/tiff
Description: Default hekerman tiff encoder/decoder.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/tiff</h1>
  <p>Default Jimp tiff encoder/decoder.</p>
</div>
npm package: @my-jimp/types
Description: Default hekerman encoder/decoders.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/types</h1>
  <p>Default Jimp types.</p>
</div>

## Supported Image Types

- [bmp](../type-bmp)
- [gif](../type-gif)
- [jpeg](../type-jpeg)
- [png](../type-png)
- [tiff](../type-tiff)
npm package: @my-jimp/utils
Description: Utils for hekerman extensions.
Latest version: 0.16.11

<div align="center">
  <img width="200" height="200"
    src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
  <h1>@jimp/utils</h1>
  <p>Utils for jimp extensions.</p>
</div>

## Available Methods

### isNodePattern

Determines if function was passed an node callback.

```js
if (isNodePattern(cb)) {
  cb.call(this, null, this);
}
```

### throwError

Either throws the error or calls the callback with the error.

```js
if (/* check for error */) {
  return throwError.call(this, 'someError', cb);
}
```

### scan

Scans through a region of the bitmap, calling a function for each pixel.

```js
function removeRed(image) {
  return scan(image, 0, 0, image.bitmap.width, image.bitmap.height, function(
    x,
    y,
    index
  ) {
    const red = this.bitmap.data[index + 0];
    const green = this.bitmap.data[index + 1];
    const blue = this.bitmap.data[index + 2];
    const alpha = this.bitmap.data[index + 3];

    this.bitmap.data[index + 0] = 0;
    this.bitmap.data[index + 1] = green;
    this.bitmap.data[index + 2] = blue;
    this.bitmap.data[index + 3] = alpha;
  });
}
```

### scanIterator

It's possible to make an iterator scan with a `for ... of`, if you want to `break` the scan before it reaches the end, but note, that this iterator has a huge performance implication:

```js
for (const { x, y, idx, image } of scanIterator(
  image,
  0,
  0,
  image.bitmap.width,
  image.bitmap.height
)) {
}
```