Jimp: Jimp writes an empty png file after modification

Created on 19 Feb 2019  路  3Comments  路  Source: oliver-moran/jimp

Expected Behavior

I'm running this process on AWS Lambda. I'm expecting the file to be modified and then written

Current Behavior

The file that is being written is a 0 Byte empty file .png file. I put the file before the mod in s3, it's as expected. I put it in s3 again after editing it and it puts a 0B file in the bucket

It does work sometimes, but 20% of the time it writes an actual image

Failure Information (for bugs)

I'm not getting an error, it's just writing an empty file.

Steps to Reproduce

    const image = await Jimp.read(path)
    await image.invert().contrast(0.7).write(path) 

Context

Node v8.10 on AWS Lambda

  • Jimp Version: 0.6.0
  • Operating System: Amazon Linux
  • Node version: 8.10

Failure Logs

None

bug

Most helpful comment

try
await image.writeAsync('name.png')

All 3 comments

I have never used AWS myself so idk how to easily make a reproduction of this. Could you provide an example repo with AWS setup instructions?

Facing same issue.

try
await image.writeAsync('name.png')

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chancein007 picture chancein007  路  5Comments

tutyamxx picture tutyamxx  路  4Comments

molipha picture molipha  路  6Comments

alyyousuf7 picture alyyousuf7  路  3Comments

SamuelZhaoY picture SamuelZhaoY  路  3Comments