11## rotate
2+ > rotate([ angle] , [ options] ) ⇒ <code >Sharp</code >
3+
24Rotate the output image by either an explicit angle
35or auto-orient based on the EXIF ` Orientation ` tag.
46
@@ -57,6 +59,8 @@ const resizeThenRotate = await sharp(input)
5759
5860
5961## flip
62+ > flip([ flip] ) ⇒ <code >Sharp</code >
63+
6064Mirror the image vertically (up-down) about the x-axis.
6165This always occurs before rotation, if any.
6266
@@ -75,6 +79,8 @@ const output = await sharp(input).flip().toBuffer();
7579
7680
7781## flop
82+ > flop([ flop] ) ⇒ <code >Sharp</code >
83+
7884Mirror the image horizontally (left-right) about the y-axis.
7985This always occurs before rotation, if any.
8086
@@ -91,6 +97,8 @@ const output = await sharp(input).flop().toBuffer();
9197
9298
9399## affine
100+ > affine(matrix, [ options] ) ⇒ <code >Sharp</code >
101+
94102Perform an affine transform on an image. This operation will always occur after resizing, extraction and rotation, if any.
95103
96104You must provide an array of length 4 or a 2x2 affine transformation matrix.
@@ -142,6 +150,8 @@ inputStream
142150
143151
144152## sharpen
153+ > sharpen([ options] , [ flat] , [ jagged] ) ⇒ <code >Sharp</code >
154+
145155Sharpen the image.
146156
147157When used without parameters, performs a fast, mild sharpen of the output image.
@@ -193,6 +203,8 @@ const data = await sharp(input)
193203
194204
195205## median
206+ > median([ size] ) ⇒ <code >Sharp</code >
207+
196208Apply median filter.
197209When used without parameters the default window is 3x3.
198210
@@ -217,6 +229,8 @@ const output = await sharp(input).median(5).toBuffer();
217229
218230
219231## blur
232+ > blur([ sigma] ) ⇒ <code >Sharp</code >
233+
220234Blur the image.
221235
222236When used without parameters, performs a fast 3x3 box blur (equivalent to a box linear filter).
@@ -248,6 +262,8 @@ const gaussianBlurred = await sharp(input)
248262
249263
250264## flatten
265+ > flatten([ options] ) ⇒ <code >Sharp</code >
266+
251267Merge alpha transparency channel, if any, with a background, then remove the alpha channel.
252268
253269See also [ removeAlpha] ( /api-channel#removealpha ) .
@@ -268,6 +284,8 @@ await sharp(rgbaInput)
268284
269285
270286## unflatten
287+ > unflatten()
288+
271289Ensure the image has an alpha channel
272290with all white pixel values made fully transparent.
273291
@@ -293,6 +311,8 @@ await sharp(rgbInput)
293311
294312
295313## gamma
314+ > gamma([ gamma] , [ gammaOut] ) ⇒ <code >Sharp</code >
315+
296316Apply a gamma correction by reducing the encoding (darken) pre-resize at a factor of ` 1/gamma `
297317then increasing the encoding (brighten) post-resize at a factor of ` gamma ` .
298318This can improve the perceived brightness of a resized image in non-linear colour spaces.
@@ -315,6 +335,8 @@ Supply a second argument to use a different output gamma value, otherwise the fi
315335
316336
317337## negate
338+ > negate([ options] ) ⇒ <code >Sharp</code >
339+
318340Produce the "negative" of the image.
319341
320342
@@ -339,6 +361,8 @@ const output = await sharp(input)
339361
340362
341363## normalise
364+ > normalise([ options] ) ⇒ <code >Sharp</code >
365+
342366Enhance output image contrast by stretching its luminance to cover a full dynamic range.
343367
344368Uses a histogram-based approach, taking a default range of 1% to 99% to reduce sensitivity to noise at the extremes.
@@ -369,6 +393,8 @@ const output = await sharp(input)
369393
370394
371395## normalize
396+ > normalize([ options] ) ⇒ <code >Sharp</code >
397+
372398Alternative spelling of normalise.
373399
374400
@@ -388,6 +414,8 @@ const output = await sharp(input)
388414
389415
390416## clahe
417+ > clahe(options) ⇒ <code >Sharp</code >
418+
391419Perform contrast limiting adaptive histogram equalization
392420[ CLAHE] ( https://en.wikipedia.org/wiki/Adaptive_histogram_equalization#Contrast_Limited_AHE ) .
393421
@@ -419,6 +447,8 @@ const output = await sharp(input)
419447
420448
421449## convolve
450+ > convolve(kernel) ⇒ <code >Sharp</code >
451+
422452Convolve the image with the specified kernel.
423453
424454
@@ -453,6 +483,8 @@ sharp(input)
453483
454484
455485## threshold
486+ > threshold([ threshold] , [ options] ) ⇒ <code >Sharp</code >
487+
456488Any pixel value greater than or equal to the threshold value will be set to 255, otherwise it will be set to 0.
457489
458490
@@ -471,6 +503,8 @@ Any pixel value greater than or equal to the threshold value will be set to 255,
471503
472504
473505## boolean
506+ > boolean(operand, operator, [ options] ) ⇒ <code >Sharp</code >
507+
474508Perform a bitwise boolean operation with operand image.
475509
476510This operation creates an output image where each pixel is the result of
@@ -495,6 +529,8 @@ the selected bitwise boolean `operation` between the corresponding pixels of the
495529
496530
497531## linear
532+ > linear([ a] , [ b] ) ⇒ <code >Sharp</code >
533+
498534Apply the linear formula ` a ` * input + ` b ` to the image to adjust image levels.
499535
500536When a single number is provided, it will be used for all image channels.
@@ -529,6 +565,8 @@ await sharp(rgbInput)
529565
530566
531567## recomb
568+ > recomb(inputMatrix) ⇒ <code >Sharp</code >
569+
532570Recombine the image with the specified matrix.
533571
534572
@@ -559,6 +597,8 @@ sharp(input)
559597
560598
561599## modulate
600+ > modulate([ options] ) ⇒ <code >Sharp</code >
601+
562602Transforms the image using brightness, saturation, hue rotation, and lightness.
563603Brightness and lightness both operate on luminance, with the difference being that
564604brightness is multiplicative whereas lightness is additive.
0 commit comments