Skip to content

Trim removing too much when transparent vs black #2166

@greghesp

Description

@greghesp

If I pass a simple png like the below, the trim function seems to trim far too much

This is before:
001 Merry Christmas 1

but this is after:
image

      sharp(file)
            .trim()
           .toFile(`./toUpload/${final}.png`)

It's worth noting that I have had success with other images, but it doesn't seem to be consistent

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions