Comparing version 1.15.0 to 2.0.0
# 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, |
@@ -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] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
124635
2694
+ Addedcolor@4.2.3(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addeddetect-libc@2.0.3(transitive)
+ Addednode-abi@3.71.0(transitive)
+ Addednode-addon-api@5.1.0(transitive)
+ Addedprebuild-install@7.1.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsharp@0.30.6(transitive)
+ Addedstring_decoder@1.3.0(transitive)
- Removedrw-stream@^0.3.3
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedchownr@2.0.0(transitive)
- Removedcolor@3.2.1(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddecompress-response@4.2.1(transitive)
- Removeddelegates@1.0.0(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removedfs-minipass@2.1.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedhas-unicode@2.0.1(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmimic-response@2.1.0(transitive)
- Removedminipass@3.3.65.0.0(transitive)
- Removedminizlib@2.1.2(transitive)
- Removedmkdirp@1.0.4(transitive)
- Removednode-abi@2.30.1(transitive)
- Removednode-addon-api@3.2.1(transitive)
- Removednoop-logger@0.1.1(transitive)
- Removednpmlog@4.1.2(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprebuild-install@5.3.6(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedrw-stream@0.3.3(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsharp@0.25.4(transitive)
- Removedsimple-get@3.1.1(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedtar@6.2.1(transitive)
- Removedwhich-pm-runs@1.1.0(transitive)
- Removedwide-align@1.1.5(transitive)
- Removedyallist@4.0.0(transitive)
Updatedsharp@0.30.6