meltingice / psd.js

A Photoshop PSD file parser for NodeJS and browsers
MIT License
2.74k stars 390 forks source link

Can saveAsPng be exported when it is exported? #121

Open sowdf opened 6 years ago

sowdf commented 6 years ago

Can saveAsPng be exported when it is exported?

fabulousduck commented 6 years ago

Hey @sowdf.

Im not sure I understand your question.

When an image is exported it is saved to disk. If you wish to get a file stream instead of a png file on disk. you can stream the pixelData inside each layer.

If you wish to export a saved image to something like AWS, you will need to consult the docs of the service you are using.

if you wish to export using a file blob to the database, please see #113 for more info on that.

Regards, Duck

sowdf commented 6 years ago

Picture compression, export time

fabulousduck commented 6 years ago

@sowdf

The images are already being compressed upon calling toPng().

If this is not compressed enough for you, you can always use a png compression lib that suits your needs.

If you wish to have a faster export time, i would look into a PSD file parser written in something like C /C++ such as psdump. I am reccomending this because PSD.js is already optimised to the point where it is only the language slowing it down.

I hope this helps you out.

Regards, Duck.