Skip to content

Commit ff4626d

Browse files
committed
Docs: clarify 'density' property refers only to vector images
1 parent e514f52 commit ff4626d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/src/content/docs/api-constructor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ where the overall height is the `pageHeight` multiplied by the number of `pages`
4040
| [options.unlimited] | <code>boolean</code> | <code>false</code> | Set this to `true` to remove safety features that help prevent memory exhaustion (JPEG, PNG, SVG, HEIF). |
4141
| [options.autoOrient] | <code>boolean</code> | <code>false</code> | Set this to `true` to rotate/flip the image to match EXIF `Orientation`, if any. |
4242
| [options.sequentialRead] | <code>boolean</code> | <code>true</code> | Set this to `false` to use random access rather than sequential read. Some operations will do this automatically. |
43-
| [options.density] | <code>number</code> | <code>72</code> | number representing the DPI for vector images in the range 1 to 100000. |
43+
| [options.density] | <code>number</code> | <code>72</code> | The DPI at which to render SVG and PDF images, in the range 1 to 100000. |
4444
| [options.ignoreIcc] | <code>number</code> | <code>false</code> | should the embedded ICC profile, if any, be ignored. |
4545
| [options.pages] | <code>number</code> | <code>1</code> | Number of pages to extract for multi-page input (GIF, WebP, TIFF), use -1 for all pages. |
4646
| [options.page] | <code>number</code> | <code>0</code> | Page number to start extracting from for multi-page input (GIF, WebP, TIFF), zero based. |

lib/constructor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const queueListener = (queueLength) => {
153153
* @param {boolean} [options.unlimited=false] - Set this to `true` to remove safety features that help prevent memory exhaustion (JPEG, PNG, SVG, HEIF).
154154
* @param {boolean} [options.autoOrient=false] - Set this to `true` to rotate/flip the image to match EXIF `Orientation`, if any.
155155
* @param {boolean} [options.sequentialRead=true] - Set this to `false` to use random access rather than sequential read. Some operations will do this automatically.
156-
* @param {number} [options.density=72] - number representing the DPI for vector images in the range 1 to 100000.
156+
* @param {number} [options.density=72] - The DPI at which to render SVG and PDF images, in the range 1 to 100000.
157157
* @param {number} [options.ignoreIcc=false] - should the embedded ICC profile, if any, be ignored.
158158
* @param {number} [options.pages=1] - Number of pages to extract for multi-page input (GIF, WebP, TIFF), use -1 for all pages.
159159
* @param {number} [options.page=0] - Page number to start extracting from for multi-page input (GIF, WebP, TIFF), zero based.

lib/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ declare namespace sharp {
994994
unlimited?: boolean | undefined;
995995
/** Set this to false to use random access rather than sequential read. Some operations will do this automatically. */
996996
sequentialRead?: boolean | undefined;
997-
/** Number representing the DPI for vector images in the range 1 to 100000. (optional, default 72) */
997+
/** The DPI at which to render SVG and PDF images, in the range 1 to 100000. (optional, default 72) */
998998
density?: number | undefined;
999999
/** Should the embedded ICC profile, if any, be ignored. */
10001000
ignoreIcc?: boolean | undefined;

0 commit comments

Comments
 (0)