Sharp: Setting limitInputPixels for composite input images

Created on 24 Feb 2020  路  2Comments  路  Source: lovell/sharp

Hi, not sure if this is a bug or it was an unintended feature that stopped working, in v0.23.3 this worked when the composite input image (image2Path) had size larger than the default limit (16k by 16k):

await sharp(image1Path)
    .limitInputPixels(false)
    .composite([
        {
            input: image2Path,
            ...
        },
    ])
    .toFile(outputPath);

But on v0.24.1 it throws Input image exceeds pixel limit error.
Also the limitInputPixels function is deprecated so there is no way to specify it for the composite input images, one possible solution is by accepting sharp object #2025, or maybe by adding limitInputPixels in composite parameters?

bug ready-to-ship

All 2 comments

Sorry about this, limitInputPixels (and sequentialRead) were supposed to have been exposed on to the composite operation.

This will be fixed in the forthcoming v0.25.0, which will allow you to use the following:

    .composite([
        {
            input: image2Path,
            limitInputPixels: false
            ...
        },
    ])

v0.25.0 now available, thank you for reporting this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AVVS picture AVVS  路  3Comments

jaekunchoi picture jaekunchoi  路  3Comments

janaz picture janaz  路  3Comments

emmtte picture emmtte  路  3Comments

paulieo10 picture paulieo10  路  3Comments