interface
Image.ConstructorOptions
interface ConstructorOptions
- maxPixels?: number
Reject inputs whose
width × heightexceeds this many pixels. The check runs after the header is read but before any pixel buffer is allocated, so a tiny file claiming a huge canvas is refused cheaply. A lower limit also lowers how much a compressed PNG chunk, such as an ICC profile, may inflate to before the image is refused.