Docs: multi-page images cannot be flipped

This commit is contained in:
Lovell Fuller 2023-05-13 08:54:21 +01:00
parent e873978e53
commit dc4b39f73f
3 changed files with 9 additions and 1 deletions

View File

@ -59,8 +59,11 @@ const resizeThenRotate = await sharp(input)
## flip ## flip
Mirror the image vertically (up-down) about the x-axis. Mirror the image vertically (up-down) about the x-axis.
This always occurs before rotation, if any. This always occurs before rotation, if any.
The use of `flip` implies the removal of the EXIF `Orientation` tag, if any. The use of `flip` implies the removal of the EXIF `Orientation` tag, if any.
This operation does not work correctly with multi-page images.
| Param | Type | Default | | Param | Type | Default |
@ -76,6 +79,7 @@ const output = await sharp(input).flip().toBuffer();
## flop ## flop
Mirror the image horizontally (left-right) about the y-axis. Mirror the image horizontally (left-right) about the y-axis.
This always occurs before rotation, if any. This always occurs before rotation, if any.
The use of `flop` implies the removal of the EXIF `Orientation` tag, if any. The use of `flop` implies the removal of the EXIF `Orientation` tag, if any.

File diff suppressed because one or more lines are too long

View File

@ -82,8 +82,11 @@ function rotate (angle, options) {
/** /**
* Mirror the image vertically (up-down) about the x-axis. * Mirror the image vertically (up-down) about the x-axis.
* This always occurs before rotation, if any. * This always occurs before rotation, if any.
*
* The use of `flip` implies the removal of the EXIF `Orientation` tag, if any. * The use of `flip` implies the removal of the EXIF `Orientation` tag, if any.
* *
* This operation does not work correctly with multi-page images.
*
* @example * @example
* const output = await sharp(input).flip().toBuffer(); * const output = await sharp(input).flip().toBuffer();
* *
@ -98,6 +101,7 @@ function flip (flip) {
/** /**
* Mirror the image horizontally (left-right) about the y-axis. * Mirror the image horizontally (left-right) about the y-axis.
* This always occurs before rotation, if any. * This always occurs before rotation, if any.
*
* The use of `flop` implies the removal of the EXIF `Orientation` tag, if any. * The use of `flop` implies the removal of the EXIF `Orientation` tag, if any.
* *
* @example * @example