Skip to content

Buffers support regressioin on 5.0.1 #62

Closed

Description

@smhutch

In v5.0.1 there appears to be no support for image Buffers.

Given this code: https://cl.ly/4b2774

pixelmatch/index.js

Lines 83 to 85 in 197e8e2

function isPixelData(arr) {
return arr instanceof Uint8Array || arr instanceof Uint8ClampedArray;
}

Activity

  1. mourner commented on Jun 10, 2019

    @mourner
    Member

    What version of Node are you running this on? Can you share a full minimal test case (e.g. as a Gist)? Buffer is inherited from Uint8Array so this holds true:

    image

  2. mourner commented on Jun 10, 2019

    @mourner
    Member

    Looking at this further, this might be related to this Jest bug jestjs/jest#4422

  3. added a commit that references this issue on Oct 8, 2026
    05fac18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions