Skip to content

Tiff bitdepth ignored #3811

@dnsbty

Description

@dnsbty

Possible bug

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

  • Running npm install sharp completes without error.
  • Running node -e "require('sharp')" completes without error.

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

Are you using the latest version of sharp?

  • I am using the latest version of sharp as reported by npm view sharp dist-tags.latest.

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 --npmGlobalPackages=sharp?

System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Max
Memory: 390.08 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.1 - ~/.asdf/installs/nodejs/18.16.1/bin/node
npm: 9.7.2 - ~/.asdf/plugins/nodejs/shims/npm
npmPackages:
sharp: ^0.32.6 => 0.32.6

What are the steps to reproduce?

await sharp("input.gif")
  .tiff({ bitdepth: 1 })
  .toFile("output.tif")

What is the expected behaviour?

When I run exiftool output.tif I would expect to see the following:

Bits Per Sample                 : 1

Instead I see this:

Bits Per Sample                 : 8 8 8

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

Reproduction

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

This is the input gif I'm using:

input

And this is the tiff image that is outputted (compressed since Github doesn't allow tiff uploads):

output.tif.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions