JSPM

@jimp/plugin-displace

0.22.11--canary.c55989b.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2869941
  • Score
    100M100P100Q278280F
  • License MIT

displace an image.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jimp/plugin-displace) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @jimp/plugin-displace

    Displace an image.

    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
    import jimp from "jimp";
    
    async function main() {
      const image = await jimp.read("test/image.png");
    
      // Make me better!
      image.displace(map, 10);
    }
    
    main();