I simply open the file, call psd_to_nested_layers(), then call nested_layers_to_psd() and output the psd file.
The file may have still all the layers there, but it is no longer viewable with Preview, programmatically I can still find all layers there. Just a patch of black in Preview.
What I Did
import pytoshop
from pytoshop import enums
from pytoshop.user import nested_layers
from PIL import Image
import io
I
I simply open the file, call psd_to_nested_layers(), then call nested_layers_to_psd() and output the psd file. The file may have still all the layers there, but it is no longer viewable with Preview, programmatically I can still find all layers there. Just a patch of black in Preview.
What I Did
import pytoshop from pytoshop import enums from pytoshop.user import nested_layers from PIL import Image import io
in_fpn = 'original.psd' out_fpn = 'updated.psd'
def test_nested_layers_no_adjust(filename, outfilename):
test_nested_layers_no_adjust(in_fpn, out_fpn)