Skip to content

Empty PNG File with "TypeError: pxData.copy is not a function" (pngjs/lib/filter.js:213) #4

@artisan-digital

Description

@artisan-digital

Hi, I'm new to nodejs, long time on Debian/Ubuntu.

This is on Ubuntu Trusty 14.04.5 LTS.

I installed nodejs 6.9.5-1nodesource1~trusty1 from the trusty repository at https://deb.nodesource.com/node_6.x according to the instructions at https://nodejs.org/en/download/package-manager/.

Then I installed psd with:

sudo npm install -g psd-cli

And received this output:

$ psd -c PATIENT\ PHOTO1.psd 

Processing PATIENT PHOTO1.psd ...
/usr/lib/node_modules/psd-cli/node_modules/pngjs/lib/filter.js:213
        pxData.copy(rawData, rawRowLength * y + 1, pxRowLength * y, pxRowLength * (y + 1));
               ^

TypeError: pxData.copy is not a function
  at Filter._filterNone (/usr/lib/node_modules/psd-cli/node_modules/pngjs/lib/filter.js:213:16)
  at Filter.filter (/usr/lib/node_modules/psd-cli/node_modules/pngjs/lib/filter.js:196:27)
  at Packer.pack (/usr/lib/node_modules/psd-cli/node_modules/pngjs/lib/packer.js:54:23)
  at .<anonymous> (/usr/lib/node_modules/psd-cli/node_modules/pngjs/lib/png.js:68:22)
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickCallback (internal/process/next_tick.js:98:9)

$

I hope there is some missing package or library that I can install.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions