psd.js icon indicating copy to clipboard operation
psd.js copied to clipboard

the img quality decrease ?

Open fashen007 opened this issue 8 years ago • 4 comments

the color info in photoshop is different to img(png) exported by psd.js 

fashen007 avatar Oct 31 '17 03:10 fashen007

Hey @spademan.

You are correct in seeing that the quality of the image is slightly worse after parsing. This is due to us compressing the image when we generate a PNG using the pngjs node module.

You can solve this issue by not using the toPNG function in the layer but rather taking the pixelData buffer and passing it to the node module yourself with compression turned off.

If you wish to see how we do this, you can find it here.

to turn off compression here you can set filterType to 0 or leave it out completely to have it default to -1.

Regards, Duck.

fabulousduck avatar Oct 31 '17 08:10 fabulousduck

how to post a png producted by pngjs to service end?

fashen007 avatar Nov 05 '17 07:11 fashen007

Hey @spademan

Im not sure what you mean by to service end ?

Could you please elaborate ?

Regards, Duck

fabulousduck avatar Nov 07 '17 15:11 fabulousduck

Hi,How to solve this problem? Is there a plan at present?

confidence68 avatar Sep 14 '22 01:09 confidence68