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

Bad export image from shape layer

Open tomashanacek opened this issue 11 years ago • 5 comments

photoshop cc psd: https://www.dropbox.com/s/jamaj3tve2qpw8l/error2.psd psd.tree.descendant_layers[0].save_as_png('output.png') output image: https://www.dropbox.com/s/voedjx5ub9bwnvz/output.png

tomashanacek avatar Apr 26 '14 19:04 tomashanacek

Any suggestion? I think there is no image data for shape layer. What about using VectorShape class?

tomashanacek avatar May 02 '14 09:05 tomashanacek

Shape layers normally do have image data, but this seems to be a case where it does not.

It could be worth seeing if the VectorShape class can render it. It's currently disabled because it relies on cairo and typically the shape layers do have image data.

meltingice avatar May 02 '14 14:05 meltingice

The question is what normally means... I save this psd without Maximize Compatibility: https://www.dropbox.com/s/nj5iwo21ntqtr8m/Screen%20Shot%202014-05-02%20at%2018.08.32.png

tomashanacek avatar May 02 '14 16:05 tomashanacek

Oh gotcha... yeah saving without maximize compatibility causes a lot of issues. First, PSD.rb needs a surefire way of detecting when it was not saved in maximize compatibility mode. I'm not sure if there is a resource flag that denotes this, or if you simply check the size of the full preview image to see if it's 0.

meltingice avatar May 02 '14 16:05 meltingice

Layer graphics background color?

nseeart avatar Jan 08 '18 05:01 nseeart