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

sharp-cli

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharp-cli - npm Package Compare versions

Comparing version 1.15.0 to 2.0.0

5

CHANGELOG.md
# Changelog
## 2.0.0 (June 18, 2022)
* Removed `--limitInputPixels` and `--sequentialRead`.
* Added [`--limitInputPixels`](https://sharp.pixelplumbing.com/api-composite#composite) when compositing images.
* Updated `sharp` dependency (adding support for Apple M1) ([#61](https://github.com/vseventer/sharp-cli/pull/61)).
## 1.15.0 (March 13, 2021)

@@ -4,0 +9,0 @@ * Added [`alpha`](https://sharp.pixelplumbing.com/api-channel#extractchannel) band option to `extractChannel`.

@@ -70,2 +70,8 @@ /*!

},
limitInputPixels: {
defaultDescription: 0x3FFF * 0x3FFF,
desc: 'Do not process input images where the number of pixels (width x height) exceeds this limit',
nargs: 1,
type: 'number'
},
offset: {

@@ -112,2 +118,3 @@ desc: 'The pixel offset from the top and left edges',

left,
limitInputPixels: args.limitInputPixels,
premultiplied: args.premultiplied,

@@ -114,0 +121,0 @@ tile: args.tile,

19

lib/cli.js

@@ -94,12 +94,2 @@ /*!

// @see https://sharp.pixelplumbing.com/en/stable/api-input/#limitinputpixels
limitInputPixels: {
alias: 'l',
defaultDescription: 0x3FFF * 0x3FFF,
desc: 'Do not process input images where the number of pixels (width x height) exceeds this limit',
group: _global,
nargs: 1,
type: 'number'
},
// @see https://sharp.pixelplumbing.com/en/stable/api-output/

@@ -223,3 +213,3 @@ output: {

choices: constants.HEIF_COMPRESSION,
default: 'hevc',
default: 'av1',
desc: 'Compression format',

@@ -321,9 +311,2 @@ group: optimize,

// @see https://sharp.pixelplumbing.com/en/stable/api-input/#sequentialread
sequentialRead: {
desc: 'An advanced setting that switches the libvips access method to VIPS_ACCESS_SEQUENTIAL',
group: optimize,
type: 'boolean'
},
// @see https://sharp.pixelplumbing.com/en/stable/api-output/#webp

@@ -330,0 +313,0 @@ smartSubsample: {

@@ -41,3 +41,3 @@ /*!

GRAVITY: Object.keys(sharp.gravity),
HEIF_COMPRESSION: ['hevc', 'avc', 'jpeg', 'av1'],
HEIF_COMPRESSION: ['hevc', 'av1'],
KERNEL: Object.keys(sharp.kernel),

@@ -44,0 +44,0 @@ LAYOUT: ['dz', 'google', 'iiif', 'zoomify'],

@@ -35,3 +35,2 @@ /*!

const isDirectory = require('is-directory')
const rw = require('rw-stream')
const sharp = require('sharp')

@@ -73,3 +72,3 @@

// Exports.
const convert = module.exports = {
module.exports = {
// Convert a list of files.

@@ -113,15 +112,7 @@ files: (input, output, args) => {

// If source equals destination, write to the same file.
let promise
if (src === dest) {
promise = rw(src).then(({ readStream, writeStream }) => {
return convert.stream(readStream, writeStream, args, transformer)
})
} else {
fs.createReadStream(src).pipe(transformer)
promise = transformer.toFile(dest)
}
// Attach info and return.
return promise.then((info) => Object.assign(info, { src, path: dest }))
// Write, attach info and return.
fs.createReadStream(src).pipe(transformer)
return transformer
.toFile(dest)
.then((info) => Object.assign(info, { src, path: dest }))
})

@@ -128,0 +119,0 @@ return Promise.all(promises)

{
"name": "sharp-cli",
"version": "1.15.0",
"version": "2.0.0",
"description": "CLI for sharp.",

@@ -33,4 +33,3 @@ "keywords": [

"multiyargs": "1.0.x",
"rw-stream": "^0.3.3",
"sharp": "0.25.4",
"sharp": "0.30.6",
"yargs": "12.0.x"

@@ -37,0 +36,0 @@ },

@@ -62,9 +62,11 @@ # sharp-cli

--compressionLevel, -c zlib compression level [number] [default: 9]
--density DPI for vector images [number] [default: 72]
--format, -f Force output to a given format
[choices: "input", "heif", "jpeg", "jpg", "png", "raw", "tiff", "webp"] [default: "input"]
--input, -i Path to (an) image file(s) [array] [required] [default: stdin]
--limitInputPixels, -l Do not process input images where the number of pixels (width x height)
exceeds this limit [number] [default: 268402689]
--level Level to extract from a multi-level input [number]
--output, -o Directory or URI template to write the image files to
[string] [required] [default: stdout]
--page Page number to start extracting from for multi-page input [number]
--pages Number of pages to extract for multi-page input [number] [default: 1]
--progressive, -p Use progressive (interlace) scan [boolean]

@@ -86,3 +88,3 @@ --quality, -q Quality [number] [default: 80]

--hcompression Compression format
[string] [choices: "hevc", "avc", "jpeg", "av1"] [default: "hevc"]
[string] [choices: "hevc", "av1"] [default: "av1"]
--lossless Use lossless compression mode [boolean]

@@ -103,4 +105,2 @@ --nearLossless use near_lossless compression mode [boolean]

[number] [default: 4]
--sequentialRead An advanced setting that switches the libvips access
method to VIPS_ACCESS_SEQUENTIAL [boolean]
--smartSubsample High quality chroma subsampling [boolean]

@@ -107,0 +107,0 @@ --squash Squash 8-bit images down to 1 bit [boolean]

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