psd.js
psd.js copied to clipboard
How can I save a Group as PNG?
the pixelData in the Group layer is [] So I dont know if there is any othrer ways to save a Group as png
hey, I also have this demand in my project and is looking for solution. happened to see this related issue yesterday, seems not accomplished yet.
i also need this solution. anyone have solve ?
This library does not contain a built in renderer, so any images exported are raw pixel data (or a full preview, but that's already generated by Photoshop). The answer is that you can't do that with this library.
You can go through each layer in the group, extract its pixelData
and combine them using a canvas (keep in mind layer positioning). This will not however preserve things such as patterns, layer styles, adjustment layers etc., doing that would require building a psd renderer.
Thank for your suggestion!
Thank for your suggestion!