Open mrqatom opened 1 year ago
code:
const xhr = new XMLHttpRequest(); xhr.open('GET', '/psd.psd', true); xhr.responseType = 'arraybuffer'; xhr.addEventListener('load', function () { const buffer = xhr.response; const psd = readPsd(buffer); console.log(psd); const buffer2 = writePsd(psd); console.log("buffer:" + buffer.byteLength + " buffer2:" + buffer2.byteLength); }, false); xhr.send();
log:
The saved picture cannot be opened and the size has changed
Can you send me your PSD file so I can check it, the new buffer will not be the same due to some encoding differences when compressing the internal images, so that's expected.
code:
log:
The saved picture cannot be opened and the size has changed