How to use @jimp/core - 3 common examples

To help you get started, we’ve selected a few @jimp/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oliver-moran / jimp / packages / custom / src / index.js View on Github external
jimpInstance.encoders = {
      ...jimpInstance.encoders,
      ...jimpConfig.encoders
    };
    jimpInstance.hasAlpha = {
      ...jimpInstance.hasAlpha,
      ...jimpConfig.hasAlpha
    };
  }

  if (configuration.plugins) {
    configuration.plugins.forEach(addPlugin);
  }

  addJimpMethods(jimpConfig.class, jimpInstance);
  addConstants(jimpConfig.constants, jimpInstance);

  return Jimp;
}
github oliver-moran / jimp / packages / custom / src / index.js View on Github external
};
    jimpInstance.encoders = {
      ...jimpInstance.encoders,
      ...jimpConfig.encoders
    };
    jimpInstance.hasAlpha = {
      ...jimpInstance.hasAlpha,
      ...jimpConfig.hasAlpha
    };
  }

  if (configuration.plugins) {
    configuration.plugins.forEach(addPlugin);
  }

  addJimpMethods(jimpConfig.class, jimpInstance);
  addConstants(jimpConfig.constants, jimpInstance);

  return Jimp;
}
github oliver-moran / jimp / packages / custom / src / index.js View on Github external
function addImageType(typeModule) {
    const type = typeModule();

    if (Array.isArray(type.mime)) {
      addType(...type.mime);
    } else {
      Object.entries(type.mime).forEach(mimeType => addType(...mimeType));
    }

    delete type.mime;
    addToConfig(type);
  }

@jimp/core

MIT
Latest version published 3 months ago

Package Health Score

92 / 100
Full package analysis

Similar packages