Open .psd file in XOJO - Cross-platform

Hi Forum,

does anybody know a way to open Photoshop files (*.psd) which works under OS X as well as under Windows?
I don’t have to write that format - just reading would be fine. In any case, I need the embedded color profile.

Another way could be to start a shell script which converts that .psd to JPEG.

Any ideas ?

[quote=123896:@Heinz-Jürgen Groß]does anybody know a way to open Photoshop files (*.psd) which works under OS X as well as under Windows?
I don’t have to write that format - just reading would be fine. In any case, I need the embedded color profile.

Another way could be to start a shell script which converts that .psd to JPEG.[/quote]

Check out sips : http://osxdaily.com/2013/01/11/converting-image-file-formats-with-the-command-line-sips/

For windows, there seem to be numerous utility programs available :
https://duckduckgo.com/?q=windows+batch+convert+psd+to+jpeg

On the MacOS (sorry about Windows) you can open a PSD via NSImage, CIImage or CGImage. MacOSLib or Christian’s MBS plugin is your friend here. Reading and writing PSD is built in to the OS.

yes - I know. But unfortunately, I need a solution for WIN, too… :frowning:

http://answers.microsoft.com/en-us/windows/forum/windows_xp-files/how-can-i-view-psd-files-in-windows/acbe5f04-0fb7-42fc-b4f2-3817d89bfb43

Bonjour Michel,

I’m not sure whether your link is really related to my question. I need to open and edit photoshop files within XOJO - under OS X as well as under Windows. For the moment, it seems that could be a difficult task especially for TagetWin32. So my second choice would be a shell-converter…

[quote=123990:@Heinz-Jürgen Groß]Bonjour Michel,

I’m not sure whether your link is really related to my question. I need to open and edit photoshop files within XOJO - under OS X as well as under Windows. For the moment, it seems that could be a difficult task especially for TagetWin32. So my second choice would be a shell-converter…[/quote]

My first post about sips on Mac and several third party utilities for Windows was all about converting the picture to be able to load it in Xojo. Now unfortunately there seems to be no equivalent of sips built in Windows, so you will have to make due.

Good luck !

As some other formats (nsf, pst) the Photoshop format is a very nice one - I believe. I did a quick Google for “psd library” and the first link brought the following gem from http://layervault.tumblr.com/post/56891876898/psd-rb:

There is to select from Java, Python, C++, Ruby. I would say you are out of luck with Xojo. But for instance it’s not too complicated to integrate other languages into Xojo.

Adobe have actually published the Photoshop file format, you need to be signed up with adobe to access it. But it is there available.

Thank you Sam! Hopefully someone will dig into this issue and provide some sort of clsPSFile for the XOJO community…

.psd documents can get extremely complex, with layers, masks, adjustment layers, smart objects etc… Maybe if you settled with a simpler subset of the format you might stand a chance, but supporting opening (and even editing) any .psd file would be some feat, with getting the code to run under OS X and Windows being one of the simpler subtasks involved.