MCPcopy Create free account

hub / github.com/lovell/sharp / functions

Functions222 in github.com/lovell/sharp

↓ 1 callersFunctioncomposite
* Composite image(s) over the processed (resized, extracted etc.) image. * * The images to composite must be the same size or smaller than the proce
lib/composite.mjs:132
↓ 1 callersFunctiondefined
(val)
lib/is.mjs:10
↓ 1 callersFunctionesmToCjs
* @param {string} input * @returns {string}
scripts/build.mjs:15
↓ 1 callersFunctionfinished
()
lib/input.mjs:668
↓ 1 callersFunctiongetBrewPkgConfigPath
()
lib/libvips.mjs:140
↓ 1 callersFunctiongetPkgConfigPath
()
lib/libvips.mjs:150
↓ 1 callersMethodgrayscale
* Alternative spelling of greyscale(). * @param grayscale true to enable and false to disable (defaults to true) * @returns A sharp
lib/index.d.ts:257
↓ 1 callersFunctionisRosetta
()
lib/libvips.mjs:94
↓ 1 callersMethodkeepXmp
* Keep all XMP metadata from the input image in the output image. * @returns A sharp instance that can be used to chain operations
lib/index.d.ts:739
↓ 1 callersFunctionlogger
(message)
test/unit/libvips.js:86
↓ 1 callersMethodpipelineColorspace
* Alternative spelling of pipelineColourspace * @param colorspace pipeline colourspace e.g. rgb16, scrgb, lab, grey16 ... * @throws
lib/index.d.ts:276
↓ 1 callersFunctionpkgConfigPath
()
lib/libvips.mjs:162
↓ 1 callersMethodremoveAlpha
* Remove alpha channel, if any. This is a no-op if the image does not have an alpha channel. * @returns A sharp instance that can be used to
lib/index.d.ts:188
↓ 1 callersFunctionresize
* Resize image to `width`, `height` or `width x height`. * * When both a `width` and `height` are provided, the possible methods by which the image
lib/resize.mjs:258
↓ 1 callersFunctionruntimePlatformArch
()
lib/libvips.mjs:41
↓ 1 callersFunctionspawnRebuild
()
lib/libvips.mjs:119
↓ 1 callersFunctiontypeDefsToEsm
(input)
scripts/build.mjs:30
↓ 1 callersFunctionuseGlobalLibvips
(logger)
lib/libvips.mjs:181
FunctionSharp
(input, options)
lib/constructor.mjs:224
Function_createInputDescriptor
* Create Object containing input and input-related options. * @private
lib/input.mjs:53
Function_flattenBufferIn
* Flattens the array of chunks accumulated in input.buffer. * @private
lib/input.mjs:553
Function_isStreamInput
* Are we expecting Stream-based input? * @private * @returns {boolean}
lib/input.mjs:564
Function_pipeline
* Invoke the C++ image processing pipeline * Supports callback, stream and promise variants * @private
lib/output.mjs:1647
Function_read
* Called by a WriteableStream to notify us it is ready for data. * @private
lib/output.mjs:1634
Function_setBackgroundColourOption
* Update a colour attribute of the this.options Object. * @private * @param {string} key * @param {string|Object} value * @throws {Error} Invalid
lib/colour.mjs:171
Function_setBooleanOption
* Update a boolean attribute of the this.options Object. * @private * @param {string} key * @param {boolean} val * @throws {Error} Invalid key
lib/output.mjs:1622
Function_updateFormatOut
* Update the output format unless options.force is false, * in which case revert to input format. * @private * @param {string} formatOut * @param
lib/output.mjs:1608
Function_write
* Handle incoming Buffer chunk on Writable Stream. * @private * @param {Buffer} chunk * @param {string} encoding - unused * @param {Function} call
lib/input.mjs:531
Functionaffine
* Perform an affine transform on an image. This operation will always occur after resizing, extraction and rotation, if any. * * You must provide an
lib/operation.mjs:180
FunctionarrayBuffer
(val)
lib/is.mjs:69
FunctionautoOrient
* Auto-orient based on the EXIF `Orientation` tag, then remove the tag. * Mirroring is supported and may infer the use of a flip operation. * * Pre
lib/operation.mjs:100
Functionavif
* Use these AVIF options for output image. * * AVIF image sequences are not supported. * * @example * const data = await sharp(input) * .avif(
lib/output.mjs:1228
Functionbandbool
* Perform a bitwise boolean operation on all input image channels (bands) to produce a single channel output image. * * @example * sharp('3-channel
lib/channel.mjs:152
Functionblock
* Block libvips operations at runtime. * * This is in addition to the `VIPS_BLOCK_UNTRUSTED` environment variable, * which when set will block all
lib/utility.mjs:235
Functionblur
* Blur the image. * * When used without parameters, performs a fast 3x3 box blur (equivalent to a box linear filter). * * When a `sigma` is provid
lib/operation.mjs:377
Functionbool
(val)
lib/is.mjs:34
Functionboolean
* Perform a bitwise boolean operation with operand image. * * This operation creates an output image where each pixel is the result of * the select
lib/operation.mjs:779
Functionbuffer
(val)
lib/is.mjs:40
FunctionbuildSharpLibvipsCPlusPlusDir
()
lib/libvips.mjs:63
FunctionbuildSharpLibvipsIncludeDir
()
lib/libvips.mjs:52
FunctionbuildSharpLibvipsLibDir
()
lib/libvips.mjs:70
Functionclahe
* Perform contrast limiting adaptive histogram equalization * {@link https://en.wikipedia.org/wiki/Adaptive_histogram_equalization#Contrast_Limited_A
lib/operation.mjs:661
Functionclone
* Take a "snapshot" of the Sharp instance, returning a new instance. * Cloned instances inherit the input of their parent instance. * This allows mu
lib/constructor.mjs:486
Functionconcurrency
* Gets or, when a concurrency is provided, sets * the maximum number of threads _libvips_ should use to process _each image_. * These are from a thr
lib/utility.mjs:160
Functionconvolve
* Convolve the image with the specified kernel. * * @example * sharp(input) * .convolve({ * width: 3, * height: 3, * kernel: [-1,
lib/operation.mjs:711
Functioncounters
* Provides access to internal task counters. * - queue is the number of tasks this module has queued waiting for _libuv_ to provide a worker thread f
lib/utility.mjs:194
Functiondilate
* Expand foreground objects using the dilate morphological operator. * * @example * const output = await sharp(input) * .dilate() * .toBuffer
lib/operation.mjs:430
FunctionensureAlpha
* Ensure the output image has an alpha transparency channel. * If missing, the added alpha channel will have the specified * transparency level, def
lib/channel.mjs:61
Functionerode
* Shrink foreground objects using the erode morphological operator. * * @example * const output = await sharp(input) * .erode() * .toBuffer()
lib/operation.mjs:453
Functionextend
* Extend / pad / extrude one or more edges of the image with either * the provided background colour or pixels derived from the image. * This operat
lib/resize.mjs:398
Functionextract
* Extract/crop a region of the image. * * - Use `extract` before `resize` for pre-resize extraction. * - Use `extract` after `resize` for post-resi
lib/resize.mjs:481
FunctionextractChannel
* Extract a single channel from a multi-channel image. * * The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit). * * @example
lib/channel.mjs:96
Functionflatten
* Merge alpha transparency channel, if any, with a background, then remove the alpha channel. * * See also {@link /api-channel#removealpha removeAlp
lib/operation.mjs:478
Functionflip
* Mirror the image vertically (up-down) about the x-axis. * This always occurs before rotation, if any. * * This operation does not work correctly
lib/operation.mjs:117
Functionflop
* Mirror the image horizontally (left-right) about the y-axis. * This always occurs before rotation, if any. * * @example * const output = await s
lib/operation.mjs:132
Functionfn
(val)
lib/is.mjs:28
Functiongamma
* Apply a gamma correction by reducing the encoding (darken) pre-resize at a factor of `1/gamma` * then increasing the encoding (brighten) post-resiz
lib/operation.mjs:524
Functiongif
* Use these GIF options for the output image. * * The first entry in the palette is reserved for transparency. * * The palette of the input image
lib/output.mjs:911
Functiongrayscale
* Alternative spelling of `greyscale`. * @param {Boolean} [grayscale=true] * @returns {Sharp}
lib/colour.mjs:63
Functiongreyscale
* Convert to 8-bit greyscale; 256 shades of grey. * This is a linear operation. If the input image is in a non-linear colour space such as sRGB, use
lib/colour.mjs:53
Functionheif
* Use these HEIF options for output image. * * Support for patent-encumbered HEIC images using `hevc` compression requires the use of a * globally-
lib/output.mjs:1256
FunctioninArray
(val, list)
lib/is.mjs:99
Functioninteger
(val)
lib/is.mjs:87
FunctioninvalidParameterError
(name, expected, actual)
lib/is.mjs:110
FunctionjoinChannel
* Join one or more channels to the image. * The meaning of the added channels depends on the output colourspace, set with `toColourspace()`. * By de
lib/channel.mjs:125
Functionjp2
* Use these JP2 options for output image. * * Requires libvips compiled with support for OpenJPEG. * The prebuilt binaries do not include this - se
lib/output.mjs:1000
Functionjpeg
* Use these JPEG options for output image. * * @example * // Convert any input to very high quality JPEG output * const data = await sharp(input)
lib/output.mjs:612
Functionjxl
* Use these JPEG-XL (JXL) options for output image. * * This feature is experimental, please do not use in production systems. * * Requires libvip
lib/output.mjs:1337
FunctionkeepExif
* Keep all EXIF metadata from the input image in the output image. * * EXIF metadata is unsupported for TIFF output. * * @since 0.33.0 * * @exam
lib/output.mjs:235
FunctionkeepGainMap
* If the input contains gain map metadata, attempt to process the image and gain map separately, * recombining them into a single output image. * *
lib/output.mjs:398
FunctionkeepIccProfile
* Keep ICC profile from the input image in the output image. * * When input and output colour spaces differ, use with {@link /api-colour/#tocoloursp
lib/output.mjs:331
FunctionkeepMetadata
* Keep all metadata (EXIF, ICC, XMP, IPTC) from the input image in the output image. * * The default behaviour, when `keepMetadata` is not used, is
lib/output.mjs:498
FunctionkeepXmp
* Keep XMP metadata from the input image in the output image. * * @since 0.34.3 * * @example * const outputWithXmp = await sharp(inputWithXmp) *
lib/output.mjs:442
Functionlinear
* Apply the linear formula `a` * input + `b` to the image to adjust image levels. * * When a single number is provided, it will be used for all imag
lib/operation.mjs:813
Functionmedian
* Apply median filter. * When used without parameters the default window is 3x3. * * @example * const output = await sharp(input).median().toBuffe
lib/operation.mjs:340
Functionmetadata
* Fast access to (uncached) image metadata without decoding any compressed pixel data. * * This is read from the header of the input image. * It do
lib/input.mjs:641
Functionmodulate
* Transforms the image using brightness, saturation, hue rotation, and lightness. * Brightness and lightness both operate on luminance, with the diff
lib/operation.mjs:932
FunctionnativeError
(native, context)
lib/is.mjs:122
Functionnegate
* Produce the "negative" of the image. * * @example * const output = await sharp(input) * .negate() * .toBuffer(); * * @example * const ou
lib/operation.mjs:561
Functionnormalise
* Enhance output image contrast by stretching its luminance to cover a full dynamic range. * * Uses a histogram-based approach, taking a default ran
lib/operation.mjs:596
Functionnormalize
* Alternative spelling of normalise. * * @example * const output = await sharp(input) * .normalize() * .toBuffer(); * * @param {Object} [op
lib/operation.mjs:634
Functionnumber
(val)
lib/is.mjs:81
Functionobject
(val)
lib/is.mjs:16
FunctionpipelineColorspace
* Alternative spelling of `pipelineColourspace`. * @param {string} [colorspace] - pipeline colorspace. * @returns {Sharp} * @throws {Error} Invalid
lib/colour.mjs:101
FunctionpipelineColourspace
* Set the pipeline colourspace. * * The input image will be converted to the provided colourspace at the start of the pipeline. * All operations wi
lib/colour.mjs:87
FunctionplainObject
(val)
lib/is.mjs:22
Functionpng
* Use these PNG options for output image. * * By default, PNG output is full colour at 8 bits per pixel. * * Indexed PNG input at 1, 2 or 4 bits p
lib/output.mjs:718
FunctionqueueListener
(queueLength)
lib/constructor.mjs:15
FunctionqueueListener
(queueLength)
test/unit/io.js:1205
Functionraw
* Force output to be raw, uncompressed pixel data. * Pixel ordering is left-to-right, top-to-bottom, without padding. * Channel ordering will be RGB
lib/output.mjs:1406
Functionrecomb
* Recombine the image with the specified matrix. * * @since 0.21.1 * * @example * sharp(input) * .recomb([ * [0.3588, 0.7044, 0.1368], *
lib/operation.mjs:865
FunctionremoveAlpha
* Remove alpha channels, if any. This is a no-op if the image does not have an alpha channel. * * See also {@link /api-operation/#flatten flatten}.
lib/channel.mjs:32
FunctionrestorePlatform
()
test/unit/libvips.js:18
Functionrotate
* Rotate the output image. * * The provided angle is converted to a valid positive degree rotation. * For example, `-450` will produce a 270 degree
lib/operation.mjs:55
Functionsharpen
* Sharpen the image. * * When used without parameters, performs a fast, mild sharpen of the output image. * * When a `sigma` is provided, performs
lib/operation.mjs:278
Functionsimd
* Get and set use of SIMD vector unit instructions. * Requires libvips to have been compiled with highway support. * * Improves the performance of
lib/utility.mjs:215
Functionstats
* Access to pixel-derived image statistics for every channel in the image. * A `Promise` is returned when `callback` is not provided. * * - `channe
lib/input.mjs:743
Functionstring
(val)
lib/is.mjs:75
Functionthreshold
* Any pixel value greater than or equal to the threshold value will be set to 255, otherwise it will be set to 0. * @param {number} [threshold=128] -
lib/operation.mjs:745
Functiontiff
* Use these TIFF options for output image. * * The `density` can be set in pixels/inch via {@link #withmetadata withMetadata} * instead of providin
lib/output.mjs:1112
← previousnext →101–200 of 222, ranked by callers