Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have tried to read the layers of a psd file and save every layer as a new pic!Is there anyone who can give me some help?
Posted
Updated 15-Jan-17 13:01pm

What have you tried ? I guess you need to either be able to control Photoshop, OR have the PSD file format and be able to write code to read and translate it.
 
Share this answer
 
my best guess would be that the PSD is constructed similar to a archive, while using a xml file to keep track of its content. As for the layers they could just as well be png files & not only, depending on file contents. However this is just a supposition. I might just as well be wrong. I'm kind of working on something similar atm. I need to read the contents of the psd file, create a xml which would be a "summary" of the file, with layer description like "position","size" and "layer name" in order to use that xml for an automated layer extraction/export function.

EDIT: Might want to have a look at GIMP. That's one opensource image editor which has PSD support. You might want to try and get more answers there.

EDIT2: might wanna take a look at this: http://www.fileformat.info/format/psd/egff.htm[^]

there is a description of how the psd stores data. Thing is it might be outdated. I would use a combo of raw data from the psd and the info there to parse the file.
 
Share this answer
 
v4
I try to find a lib or a control to fulfill this function but I only get libpsd but I don't know how to use it!

I also see "Import Adobe Photoshop (.psd) images" but it just read the Image data not the Layer and mask information!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900