jimp-dev / jimp

An image processing library written entirely in JavaScript for Node, with zero external or native dependencies.
http://jimp-dev.github.io/jimp/
MIT License
13.97k stars 762 forks source link

Uncaught Error: Cant access the filesystem #728

Open xddlj opened 5 years ago

xddlj commented 5 years ago

Expected Behavior

Jim.read() to read the file lenna.write('lena-small-bw.jpg') to write a file to the local folder.

Current Behavior

Jim.read() works fine. lenna.write('lena-small-bw.jpg') throws an error

Failure Information (for bugs)

index.js:139 Error: Cant access the filesystem. You can use the getBase64 method. at Jimp.write (jimp.js:33813) at index.js:132

Steps to Reproduce

the codes: Jimp.read('static/images/beach.jpg') .then(lenna => { console.log('lenna', lenna)
return lenna .resize(120, 120) // resize .quality(60) // set JPEG quality .greyscale() // set greyscale .write('lena-small-bw.jpg'); .catch(err => { console.error(err); });

javiervelaz commented 5 years ago

not news about this?

wudi00 commented 5 years ago

How to solve the problem?I meet the same problem.

l0u1sg commented 3 years ago

UP ?

Sadiq-Naizam commented 2 years ago

Any fix to this?

hipstersmoothie commented 1 year ago

You're probably trying to call write when in the browser which jimp can't do. This error could be more informative for sure