mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Docs: reorder/highlight optional output properties
This commit is contained in:
@@ -173,6 +173,8 @@ function toFormat (format, options) {
|
||||
/**
|
||||
* Use these JPEG options for output image.
|
||||
*
|
||||
* Some of these options require the use of a globally-installed libvips compiled with support for mozjpeg.
|
||||
*
|
||||
* @example
|
||||
* // Convert any input to very high quality JPEG output
|
||||
* const data = await sharp(input)
|
||||
@@ -186,14 +188,14 @@ function toFormat (format, options) {
|
||||
* @param {number} [options.quality=80] - quality, integer 1-100
|
||||
* @param {boolean} [options.progressive=false] - use progressive (interlace) scan
|
||||
* @param {string} [options.chromaSubsampling='4:2:0'] - for quality < 90, set to '4:4:4' to prevent chroma subsampling otherwise defaults to '4:2:0' (use chroma subsampling); for quality >= 90 chroma is never subsampled
|
||||
* @param {boolean} [options.optimiseCoding=true] - optimise Huffman coding tables
|
||||
* @param {boolean} [options.optimizeCoding=true] - alternative spelling of optimiseCoding
|
||||
* @param {boolean} [options.trellisQuantisation=false] - apply trellis quantisation, requires libvips compiled with support for mozjpeg
|
||||
* @param {boolean} [options.overshootDeringing=false] - apply overshoot deringing, requires libvips compiled with support for mozjpeg
|
||||
* @param {boolean} [options.optimiseScans=false] - optimise progressive scans, forces progressive, requires libvips compiled with support for mozjpeg
|
||||
* @param {boolean} [options.optimizeScans=false] - alternative spelling of optimiseScans
|
||||
* @param {boolean} [options.optimiseCoding=true] - optimise Huffman coding tables
|
||||
* @param {boolean} [options.optimizeCoding=true] - alternative spelling of optimiseCoding
|
||||
* @param {boolean} [options.optimizeScans=false] - alternative spelling of optimiseScans, requires libvips compiled with support for mozjpeg
|
||||
* @param {number} [options.quantisationTable=0] - quantization table to use, integer 0-8, requires libvips compiled with support for mozjpeg
|
||||
* @param {number} [options.quantizationTable=0] - alternative spelling of quantisationTable
|
||||
* @param {number} [options.quantizationTable=0] - alternative spelling of quantisationTable, requires libvips compiled with support for mozjpeg
|
||||
* @param {boolean} [options.force=true] - force JPEG output, otherwise attempt to use input format
|
||||
* @returns {Sharp}
|
||||
* @throws {Error} Invalid options
|
||||
@@ -253,6 +255,8 @@ function jpeg (options) {
|
||||
* PNG output is always full colour at 8 or 16 bits per pixel.
|
||||
* Indexed PNG input at 1, 2 or 4 bits per pixel is converted to 8 bits per pixel.
|
||||
*
|
||||
* Some of these options require the use of a globally-installed libvips compiled with support for libimagequant (GPL).
|
||||
*
|
||||
* @example
|
||||
* // Convert any input to PNG output
|
||||
* const data = await sharp(input)
|
||||
|
||||
Reference in New Issue
Block a user