Copy link to clipboard
Copied
Hi,
I want read PSD file from my standalone application in c++.
How can I do it? Is there some documentation?
Thanks
Rino
Copy link to clipboard
Copied
Start by reading the SDK documentation.
Then, from what you read, request the PSD file format spec documentation.
Then you'll have to write a parser for PSD files, and possibly all the blending, filtering, and effects code to render a PSD file.
Copy link to clipboard
Copied
The "Preview" application bundled with Mac OS X can open and display PSD files.
Are you implying that Apple wrote all their own code to render the files?
Copy link to clipboard
Copied
No, because Preview can't display all PSD files.
Normally it just shows a picture saying "this file was saved without a composite".
Copy link to clipboard
Copied
Apple might have written it themselves, or borrowed code from open source parsers, but in either case, like everyone else they are limited - as Chris implies - to the tiny subset of PSD that is documented or feasible to reverse engineer. I am not sure how else you imagine they do it - code doesn't just fall from the sky.
Then - whatever you can reasonably extract out of it, absent the merged data you need a Photoshop compatible compositing engine to correctly preview it. Apple could maybe license that from Adobe, but the payoff seems small, and the required code very large.
Copy link to clipboard
Copied
Then what's the Photoshop SDK for? It is only for writing plug-ins? Or can you read and render PSD files with it?
Copy link to clipboard
Copied
The former only.
There is no code or library relating to PSD in the SDK. At one time there was some very limited documentation for it, but debugging the documentation and implementing the results was up to you. And nothing at all about compositing. Secret sauce, you know.
Copy link to clipboard
Copied
July 2010 version attached.
See also:
http://forums.adobe.com/message/3265830, psd and psb File Format Specifications
http://forums.adobe.com/thread/608710, PSD File specs
http://forums.adobe.com/thread/678624, Not getting the file spec
http://forums.adobe.com/thread/663651, Photoshop file formats pdf
http://forums.adobe.com/message/3265923, PSB PSD 8BIM 8B64
http://forums.adobe.com/message/3265926, How can I get Photoshop file format document?
http://forums.adobe.com/message/3265927, How to parse text layer in PSD file?
Copy link to clipboard
Copied
If you want to read the channel and layer image data, you can try my PSD parser in C, http://telegraphics.com.au/svn/psdparse/trunk
Writing your own will take 100s of hours of trial & error due to incomplete & faulty documentation (if you can even obtain it).
Copy link to clipboard
Copied
Thanks a lot ! I also had the same question with Rino_ !