Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sharp

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharp - npm Package Compare versions

Comparing version 0.32.2 to 0.32.3

4

lib/composite.js

@@ -111,3 +111,3 @@ // Copyright 2013 Lovell Fuller and others.

* @param {number} [images[].input.text.dpi=72] - the resolution (size) at which to render the text. Does not take effect if `height` is specified.
* @param {boolean} [images[].input.text.rgba=false] - set this to true to enable RGBA output. This is useful for colour emoji rendering, or support for pango markup features like `<span foreground="red">Red!</span>`.
* @param {boolean} [images[].input.text.rgba=false] - set this to true to enable RGBA output. This is useful for colour emoji rendering, or support for Pango markup features like `<span foreground="red">Red!</span>`.
* @param {number} [images[].input.text.spacing=0] - text line height in points. Will use the font line height if none is specified.

@@ -119,3 +119,3 @@ * @param {String} [images[].blend='over'] - how to blend this image with the image below.

* @param {Boolean} [images[].tile=false] - set to true to repeat the overlay image across the entire image with the given `gravity`.
* @param {Boolean} [images[].premultiplied=false] - set to true to avoid premultipling the image below. Equivalent to the `--premultiplied` vips option.
* @param {Boolean} [images[].premultiplied=false] - set to true to avoid premultiplying the image below. Equivalent to the `--premultiplied` vips option.
* @param {Number} [images[].density=72] - number representing the DPI for vector overlay image.

@@ -122,0 +122,0 @@ * @param {Object} [images[].raw] - describes overlay when using raw pixel data.

@@ -52,3 +52,3 @@ // Copyright 2013 Lovell Fuller and others.

* @example
* // Create a blank 300x200 PNG image of semi-transluent red pixels
* // Create a blank 300x200 PNG image of semi-translucent red pixels
* sharp({

@@ -126,3 +126,3 @@ * create: {

* @param {Object} [options] - if present, is an Object with optional attributes.
* @param {string} [options.failOn='warning'] - when to abort processing of invalid pixel data, one of (in order of sensitivity): 'none' (least), 'truncated', 'error' or 'warning' (most), highers level imply lower levels, invalid metadata will always abort.
* @param {string} [options.failOn='warning'] - when to abort processing of invalid pixel data, one of (in order of sensitivity): 'none' (least), 'truncated', 'error' or 'warning' (most), higher levels imply lower levels, invalid metadata will always abort.
* @param {number|boolean} [options.limitInputPixels=268402689] - Do not process input images where the number of pixels

@@ -296,2 +296,3 @@ * (width x height) exceeds this limit. Assumes image dimensions contained in the input metadata can be trusted.

webpSmartSubsample: false,
webpPreset: 'default',
webpEffort: 4,

@@ -298,0 +299,0 @@ webpMinSize: false,

@@ -14,3 +14,3 @@ // Copyright 2013 Lovell Fuller and others.

* If an angle is provided, it is converted to a valid positive degree rotation.
* For example, `-450` will produce a 270deg rotation.
* For example, `-450` will produce a 270 degree rotation.
*

@@ -776,3 +776,3 @@ * When rotating by an angle other than a multiple of 90,

/**
* Recomb the image with the specified matrix.
* Recombine the image with the specified matrix.
*

@@ -790,3 +790,3 @@ * @since 0.21.1

* .toBuffer(function(err, data, info) {
* // data contains the raw pixel data after applying the recomb
* // data contains the raw pixel data after applying the matrix
* // With this example input, a sepia filter has been applied

@@ -848,3 +848,3 @@ * });

* @example
* // decreate brightness and saturation while also hue-rotating by 90 degrees
* // decrease brightness and saturation while also hue-rotating by 90 degrees
* const output = await sharp(input)

@@ -851,0 +851,0 @@ * .modulate({

@@ -486,2 +486,3 @@ // Copyright 2013 Lovell Fuller and others.

* @param {boolean} [options.smartSubsample=false] - use high quality chroma subsampling
* @param {string} [options.preset='default'] - named preset for preprocessing/filtering, one of: default, photo, picture, drawing, icon, text
* @param {number} [options.effort=4] - CPU effort, between 0 (fastest) and 6 (slowest)

@@ -521,2 +522,9 @@ * @param {number} [options.loop=0] - number of animation iterations, use 0 for infinite animation

}
if (is.defined(options.preset)) {
if (is.string(options.preset) && is.inArray(options.preset, ['default', 'photo', 'picture', 'drawing', 'icon', 'text'])) {
this.options.webpPreset = options.preset;
} else {
throw is.invalidParameterError('preset', 'one of: default, photo, picture, drawing, icon, text', options.preset);
}
}
if (is.defined(options.effort)) {

@@ -523,0 +531,0 @@ if (is.integer(options.effort) && is.inRange(options.effort, 0, 6)) {

{
"name": "sharp",
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
"version": "0.32.2",
"version": "0.32.3",
"author": "Lovell Fuller <npm@lovell.info>",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/lovell/sharp",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc