Skip to content

Composite Tiling Center #2626

@goldenjayr

Description

@goldenjayr

I tried using sharp composite to tile my images.

I am trying to achieve achieve a tiling that starts from the center that results to like this.
old

However what I got is like this.
new

Please help ASAP. Thank you so much.

Here's my code:

const sharpImage = sharp({
  create: {
    width,
    height,
    channels: 4,
    background: { r: 0, g: 0, b: 0 }
  }
}).composite([{ input: image, tile: true, gravity: 'center' }]).png().toBuffer()

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions