MCPcopy Create free account

hub / github.com/lovell/sharp / functions

Functions222 in github.com/lovell/sharp

↓ 644 callersMethodtoBuffer
* Write output to a Buffer. JPEG, PNG, WebP, AVIF, TIFF, GIF and RAW output are supported. * By default, the format will match the input imag
lib/index.d.ts:661
↓ 497 callersMethodresize
* Resize image to width, height or width x height. * * When both a width and height are provided, the possible methods by which the
lib/index.d.ts:925
↓ 175 callersMethodmetadata
* Fast access to (uncached) image metadata without decoding any compressed image data. * @returns A sharp instance that can be used to chain
lib/index.d.ts:326
↓ 132 callersFunctionisInAcceptableRange
(actual, expected)
test/unit/stats.js:14
↓ 111 callersFunctionisInRange
(actual, min, max)
test/unit/stats.js:17
↓ 108 callersFunctionisInteger
(val)
test/unit/stats.js:20
↓ 105 callersMethodtoFile
* Write output image data to a file. * If an explicit output format is not selected, it will be inferred from the extension, with JPEG, PNG,
lib/index.d.ts:645
↓ 99 callersFunctiongetPath
(filename)
test/fixtures/index.js:13
↓ 74 callersMethodpng
* Use these PNG options for output image. * PNG output is always full colour at 8 or 16 bits per pixel. * Indexed PNG input at 1, 2
lib/index.d.ts:794
↓ 65 callersMethodjpeg
* Use these JPEG options for output image. * @param options Output options. * @throws {Error} Invalid options * @returns A
lib/index.d.ts:764
↓ 58 callersMethodtiff
* Use these TIFF options for output image. * @param options Output options. * @throws {Error} Invalid options * @returns A
lib/index.d.ts:836
↓ 57 callersMethodrotate
* Rotate the output image by either an explicit angle * or auto-orient based on the EXIF `Orientation` tag. * * If an angle
lib/index.d.ts:407
↓ 54 callersMethodraw
* Force output to be raw, uncompressed uint8 pixel data. * @param options Raw output options. * @throws {Error} Invalid options
lib/index.d.ts:844
↓ 51 callersMethodwebp
* Use these WebP options for output image. * @param options Output options. * @throws {Error} Invalid options * @returns A
lib/index.d.ts:802
↓ 49 callersMethodextract
* Extract a region of the image. * - Use extract() before resize() for pre-resize extraction. * - Use extract() after resize() for
lib/index.d.ts:956
↓ 48 callersMethodtile
* Use tile-based deep zoom (image pyramid) output. * Set the format and options for tile images via the toFormat, jpeg, png or webp functions
lib/index.d.ts:877
↓ 40 callersMethodcomposite
* Composite image(s) over the processed (resized, extracted etc.) image. * * The images to composite must be the same size or smalle
lib/index.d.ts:308
↓ 39 callersMethodgif
* Use these GIF options for output image. * Requires libvips compiled with support for ImageMagick or GraphicsMagick. The prebuilt binaries d
lib/index.d.ts:811
↓ 36 callersFunctioncollect
(metadata, spec)
test/unit/metadata.js:17
↓ 35 callersMethodtoColourspace
* Set the output colourspace. * By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels.
lib/index.d.ts:285
↓ 33 callersMethodstats
* Access to pixel-derived image statistics for every channel in the image. * @returns A sharp instance that can be used to chain operations
lib/index.d.ts:344
↓ 31 callersFunctionbufferWithInfo
(image)
test/unit/rotate.js:11
↓ 29 callersMethodextend
* Extend / pad / extrude one or more edges of the image with either * the provided background colour or pixels derived from the image.
lib/index.d.ts:944
↓ 27 callersMethodwithMetadata
* Include all metadata (EXIF, XMP, IPTC) from the input image in the output image. * The default behaviour, when withMetadata is not used, is
lib/index.d.ts:756
↓ 26 callersMethodtrim
* Trim pixels from all edges that contain values similar to the given background colour, which defaults to that of the top-left pixel. * Imag
lib/index.d.ts:966
↓ 25 callersMethodaffine
* Perform an affine transform on an image. This operation will always occur after resizing, extraction and rotation, if any. * You must provi
lib/index.d.ts:460
↓ 23 callersMethodclahe
* Perform contrast limiting adaptive histogram equalization (CLAHE) * * This will, in general, enhance the clarity of the image by b
lib/index.d.ts:572
↓ 21 callersMethodblur
* Blur the image. * When used without parameters, performs a fast, mild blur of the output image. * When a sigma is provided, perfor
lib/index.d.ts:490
↓ 20 callersMethodjoinChannel
* Join one or more channels to the image. The meaning of the added channels depends on the output colourspace, set with toColourspace(). * By
lib/index.d.ts:218
↓ 20 callersMethodtoFormat
* Force output to a given format. * @param format a String or an Object with an 'id' attribute * @param options output options
lib/index.d.ts:853
↓ 19 callersMethodheif
* Use these HEIF options for output image. * Support for patent-encumbered HEIC images requires the use of a globally-installed libvips compi
lib/index.d.ts:828
↓ 18 callersMethodnegate
* Produce the "negative" of the image. * @param negate true to enable and false to disable, or an object of options (defaults to true)
lib/index.d.ts:539
↓ 18 callersMethodsharpen
* Sharpen the image. * When used without parameters, performs a fast, mild sharpen of the output image. * When a sigma is provided,
lib/index.d.ts:471
↓ 17 callersMethodjxl
* Use these JPEG-XL (JXL) options for output image. * This feature is experimental, please do not use in production systems. * Requi
lib/index.d.ts:784
↓ 16 callersFunctionexpectSimilar
(t, expectedImage, actualImage)
test/unit/rotate.js:12
↓ 16 callersMethodlinear
* Apply the linear formula a * input + b to the image (levels adjustment) * @param a multiplier (optional, default 1.0) * @param b o
lib/index.d.ts:609
↓ 15 callersMethodavif
* Use these AVIF options for output image. * @param options Output options. * @throws {Error} Invalid options * @returns A
lib/index.d.ts:819
↓ 14 callersMethodnormalise
* Enhance output image contrast by stretching its luminance to cover a full dynamic range. * * Uses a histogram-based approach, taki
lib/index.d.ts:553
↓ 14 callersMethodthreshold
* Any pixel value greather than or equal to the threshold value will be set to 255, otherwise it will be set to 0. * @param threshold a value
lib/index.d.ts:589
↓ 13 callersMethodrecomb
* Recomb the image with the specified matrix. * @param inputMatrix 3x3 Recombination matrix or 4x4 Recombination matrix * @throws {E
lib/index.d.ts:617
↓ 12 callersMethodwithIccProfile
* Transform using an ICC profile and attach to the output image. * @param {string} icc - Absolute filesystem path to output ICC profile or bu
lib/index.d.ts:733
↓ 11 callersMethodextractChannel
* Extract a single channel from a multi-channel image. * @param channel zero-indexed channel/band number to extract, or red, green, blue or a
lib/index.d.ts:203
↓ 11 callersMethodmodulate
* Transforms the image using brightness, saturation, hue rotation and lightness. * Brightness and lightness both operate on luminance, with t
lib/index.d.ts:625
↓ 10 callersFunctionassertDeepZoomTiles
(t, directory, expectedSize, expectedLevels)
test/unit/tile.js:26
↓ 10 callersFunctioncountDeepZoomAssertions
(directory)
test/unit/tile.js:15
↓ 10 callersMethodtint
* Tint the image using the provided colour. * An alpha channel may be present and will be unchanged by the operation. * @param tint
lib/index.d.ts:238
↓ 10 callersMethodwithXmp
* Set XMP metadata in the output image. * @param {string} xmp - String containing XMP metadata to be embedded in the output image. *
lib/index.d.ts:747
↓ 9 callersFunctionbuildPlatformArch
()
lib/libvips.mjs:43
↓ 9 callersMethodconvolve
* Convolve the image with the specified kernel. * @param kernel the specified kernel * @throws {Error} Invalid parameters *
lib/index.d.ts:580
↓ 9 callersMethodflatten
* Merge alpha transparency channel, if any, with background. * @param flatten true to enable and false to disable (defaults to true)
lib/index.d.ts:513
↓ 9 callersMethodgamma
* Apply a gamma correction by reducing the encoding (darken) pre-resize at a factor of 1/gamma then increasing the encoding (brighten) post-resize at
lib/index.d.ts:532
↓ 8 callersMethodgreyscale
* 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
lib/index.d.ts:250
↓ 7 callersFunctionassertGoogleTiles
(t, directory, expectedLevels, extension = 'jpg')
test/unit/tile.js:74
↓ 7 callersMethodautoOrient
* Alias for calling `rotate()` with no arguments, which orients the image based * on EXIF orientsion. * * This operation is
lib/index.d.ts:421
↓ 7 callersMethodflip
* Flip the image about the vertical Y axis. This always occurs after rotation, if any. * The use of flip implies the removal of the EXIF Orie
lib/index.d.ts:429
↓ 7 callersFunctionlog
(item)
lib/libvips.mjs:29
↓ 7 callersMethodpipelineColourspace
* Set the pipeline colourspace. * The input image will be converted to the provided colourspace at the start of the pipeline. * All
lib/index.d.ts:268
↓ 6 callersMethodboolean
* Perform a bitwise boolean operation with operand image. * This operation creates an output image where each pixel is the result of the sele
lib/index.d.ts:600
↓ 6 callersMethodclone
* Take a "snapshot" of the Sharp instance, returning a new instance. * Cloned instances inherit the input of their parent instance.
lib/index.d.ts:320
↓ 6 callersFunctioninRange
(val, min, max)
lib/is.mjs:93
↓ 6 callersMethodkeepIccProfile
* Keep ICC profile from the input image in the output image where possible. * @returns A sharp instance that can be used to chain operations
lib/index.d.ts:725
↓ 6 callersFunctionrandomDimension
()
test/bench/random.js:19
↓ 5 callersFunctionassertNormalized
(t, data)
test/unit/normalize.js:11
↓ 5 callersFunctionassertZoomifyTiles
(t, directory, expectedLevels)
test/unit/tile.js:58
↓ 5 callersFunctioncountZoomifyAssertions
(directory)
test/unit/tile.js:53
↓ 5 callersMethodflop
* Flop the image about the horizontal X axis. This always occurs after rotation, if any. * The use of flop implies the removal of the EXIF Or
lib/index.d.ts:437
↓ 5 callersMethodjp2
* Use these JP2 (JPEG 2000) options for output image. * @param options Output options. * @throws {Error} Invalid options *
lib/index.d.ts:772
↓ 5 callersMethodnormalize
* Alternative spelling of normalise. * @param normalize options * @throws {Error} Invalid parameters * @returns A sharp ins
lib/index.d.ts:561
↓ 5 callersMethodwithExif
* Set EXIF metadata in the output image, ignoring any EXIF in the input image. * @param {Exif} exif Object keyed by IFD0, IFD1 etc. of key/va
lib/index.d.ts:711
↓ 4 callersMethodbandbool
* Perform a bitwise boolean operation on all input image channels (bands) to produce a single channel output image. * @param boolOp one of "a
lib/index.d.ts:226
↓ 4 callersMethoddilate
* Expand foreground objects using the dilate morphological operator. * @param {Number} [width=1] dilation width in pixels. * @throws
lib/index.d.ts:498
↓ 4 callersMethoderode
* Shrink foreground objects using the erode morphological operator. * @param {Number} [width=1] erosion width in pixels. * @throws {
lib/index.d.ts:506
↓ 4 callersFunctionisResizeExpected
* @private
lib/resize.mjs:116
↓ 4 callersMethodmedian
* Apply median filter. When used without parameters the default window is 3x3. * @param size square mask size: size x size (optional, default
lib/index.d.ts:479
↓ 4 callersMethodtimeout
* Set a timeout for processing, in seconds. Use a value of zero to continue processing indefinitely, the default behaviour. * The clock start
lib/index.d.ts:886
↓ 4 callersMethodwithDensity
* Set output density (DPI) in EXIF metadata. * @param density Density in dots per inch (DPI). * @returns A sharp instance that can b
lib/index.d.ts:696
↓ 3 callersMethodensureAlpha
* Ensure alpha channel, if missing. The added alpha channel will be fully opaque. This is a no-op if the image already has an alpha channel.
lib/index.d.ts:195
↓ 3 callersFunctionisRotationExpected
* @private
lib/resize.mjs:109
↓ 3 callersMethodkeepExif
* Keep all EXIF metadata from the input image in the output image. * EXIF metadata is unsupported for TIFF output. * @returns A shar
lib/index.d.ts:703
↓ 3 callersFunctionsetPlatform
(platform)
test/unit/libvips.js:14
↓ 3 callersFunctionskipSearch
(status, reason, logger)
lib/libvips.mjs:174
↓ 3 callersMethodtoColorspace
* Alternative spelling of toColourspace(). * @param colorspace output colorspace e.g. srgb, rgb, cmyk, lab, b-w ... * @throws {Error
lib/index.d.ts:293
↓ 3 callersMethodtoUint8Array
* Write output to a Uint8Array backed by a transferable ArrayBuffer. JPEG, PNG, WebP, AVIF, TIFF, GIF and RAW output are supported. * By defa
lib/index.d.ts:688
↓ 3 callersFunctiontrySetAnimationOptions
* Set animation options if available. * @private * * @param {Object} [source] - output options * @param {number} [source.loop=0] - number of anima
lib/output.mjs:1055
↓ 3 callersMethodunflatten
* Ensure the image has an alpha channel with all white pixel values made fully transparent. * Existing alpha channel values for non-white pix
lib/index.d.ts:520
↓ 2 callersFunctionbitdepthFromColourCount
(colours)
lib/output.mjs:36
↓ 2 callersFunctionerrJp2Save
()
lib/output.mjs:34
↓ 2 callersFunctionfingerprint
(image)
test/fixtures/index.js:17
↓ 2 callersFunctionglobalLibvipsVersion
()
lib/libvips.mjs:125
↓ 2 callersFunctionisEmscripten
()
lib/libvips.mjs:89
↓ 2 callersFunctionisUnsupportedNodeRuntime
()
lib/libvips.mjs:81
↓ 2 callersMethodkeepMetadata
* Keep all metadata (EXIF, ICC, XMP, IPTC) from the input image in the output image. * @returns A sharp instance that can be used to chain op
lib/index.d.ts:338
↓ 2 callersFunctionruntimeLibc
()
lib/libvips.mjs:39
↓ 2 callersFunctionsafeRequire
(name)
test/bench/perf.js:12
↓ 2 callersFunctionsha512
(s)
lib/libvips.mjs:104
↓ 2 callersMethodwithExifMerge
* Update EXIF metadata from the input image in the output image. * @param {Exif} exif Object keyed by IFD0, IFD1 etc. of key/value string pai
lib/index.d.ts:719
↓ 1 callersFunction_getBackgroundColourOption
* Create a RGBA colour array from a given value. * @private * @param {string|Object} value * @throws {Error} Invalid value
lib/colour.mjs:143
↓ 1 callersFunction_inputOptionsFromObject
* Extract input options, if any, from an object. * @private
lib/input.mjs:40
↓ 1 callersFunctionassertTileOverlap
(t, directory, tileSize)
test/unit/tile.js:92
↓ 1 callersFunctioncache
* Gets or, when options are provided, sets the limits of _libvips'_ operation cache. * Existing entries in the cache will be trimmed after any change
lib/utility.mjs:108
next →1–100 of 222, ranked by callers