EmilDohne / PhotoshopAPI

A modern and performant C++20 read/write parser of Photoshop Files (*.psd and *.psb) with fully fledged Python bindings hosted on PyPi
https://photoshopapi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
94 stars 9 forks source link

When creating a Photoshop file with only group layers we cannot open the file #65

Open EmilDohne opened 5 months ago

EmilDohne commented 5 months ago

This appears to be due to the way we calculate the amount of channels in a file when going from LayeredFile<T> -> PhotoshopFile. It doesnt detect any channels and therefore writes out 0 which isnt valid for Photoshop. What it appears to actually do is just write out 4 channels in RGB mode and write that into the merged image data section

EmilDohne commented 6 days ago

In addition we default initialize the LayeredFile document with a width and height of 0 which isnt valid. This should be set to 1 by default