lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
29.33k stars 1.3k forks source link

Composite keep tiling even if tile is false #4209

Closed egstar closed 2 months ago

egstar commented 2 months ago

Possible bug

Is this a possible bug in a feature of sharp, unrelated to installation?

If you cannot confirm both of these, please open an installation issue instead.

Are you using the latest version of sharp?

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.

If you are using another package which depends on a version of sharp that is not the latest, please open an issue against that package instead.

What is the output of running npx envinfo --binaries --system --npmPackages=sharp,next --npmGlobalPackages=sharp?

  System:
    OS: Linux 4.18 AlmaLinux 8.10 (Cerulean Leopard)
    CPU: (2) x64 AMD EPYC 7543P 32-Core Processor
    Memory: 4.83 GB / 7.77 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 22.8.0 - ~/.nvm/versions/node/v22.8.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v22.8.0/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v22.8.0/bin/npm
  npmPackages:
    next: 14.2.5 => 14.2.5 
    sharp: ^0.33.5 => 0.33.5 

What are the steps to reproduce?

The tile options works normally on localhost, but when i use after on Almalinux 8 server it ignores false status

test link

What is the expected behaviour?

To have a single logo in the center of the original image.

Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem

await sharp(image).webp({ quality: 100 })
                    .composite([
                        {
                            input: 'src/data/assets/images/logo.webp',
                            gravity: 'center',
                            blend: 'overlay',
                            tile: false,
                        }
                    ])
                    .toBuffer()
                    .then((img) => {
                        data = `${img.toString('base64')}`
                    })

Please provide sample image(s) that help explain this problem

Current result ( On server ) currentres

Expected result ( Same as on localhost ) expected

lovell commented 2 months ago

Please can you provide a minimal, standalone code sample and image that allows someone else to reproduce.

egstar commented 2 months ago

Oh, after testing the standalone function, i found the typo, that the source of image was already saved with the tiles, that's why, Sorry for bothering you, has been fixed..

Thanks for your reply