Skip to content

recomb: bands in must equal matrix width, greyscale image #2584

@CharlieHess

Description

@CharlieHess
  • Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?
    Yes

  • What are the steps to reproduce?

sharp().recomb([
  [0.3588, 0.7044, 0.1368],
  [0.299, 0.587, 0.114],
  [0.2392, 0.4696, 0.0912],
])

On the image below (taken from TMDb's API). You'll get an error:

recomb: bands in must equal matrix width
  • What is the expected behaviour?
    The recomb operation succeeds instead of throwing

  • Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
    Code snippet above, combined with a pipe, is all you need

  • Are you able to provide a sample image that helps explain the problem?
    The image below, taken from TMDb's backdrop_image for Malcolm & Marie: https://image.tmdb.org/t/p/w1280/iOrjCeIyRb4vDY3vbPSaEBCA1D3.jpg

722913-backdrop

  • What is the output of running npx envinfo --binaries --system?
  System:
    OS: macOS 11.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 568.23 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.18.1 - ~/.nvm/versions/node/v12.18.1/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v12.18.1/bin/npm

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions