Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make and edit .psd file in iPhone file system

I was wondering what the easiest way to make a .psd file from within an iPhone app. I am making an app just like the Layers app, and I can't fiure out how he makes and edits .psd files.

like image 677
Jab Avatar asked Apr 23 '11 03:04

Jab


People also ask

Can you edit a PSD file on iPhone?

You can open and edit PSD files using Autodesk Sketchbook, or Photopea Online Editor. You can also open PSD files saved to the Creative Cloud sync folder in Photoshop Mix. However, Photoshop Mix cannot open all layers at once, and it doesn't have the same tools as the desktop version of Photoshop.

Can you open a PSD on iPhone?

Can you open PSDs on an iPhone? You can open PSDs on your iPhone or Android phone if you have access the Adobe Photoshop Express app.


2 Answers

Writing a psd parser yourself is a futile business. See the super-famous quote from here (original source code)

            // At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
            // PSD is not a good format. PSD is not even a bad format. Calling it such would be an
            // insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
            // worked on this code for several weeks now, my hate for PSD has grown to a raging fire
            // that burns with the fierce passion of a million suns.

It goes on and on. So, look for an (open-source) psd reading/writing library.

like image 142
Yuji Avatar answered Oct 23 '22 02:10

Yuji


I'm the author of the Layers app the OP mentioned. Unfortunately, coneybeare is right - I pretty much wrote an objective-c implementation from scratch. The trick turned out to be basing it off a very old version of the PSD spec, from before it got insanely polluted with crap. Layers actually writes Photoshop 3 files.

UPDATE: I've published the PSDWriter from Layers on github. You can use it to write PSD files from a set of UIImages on iOS or Mac OS X: https://github.com/bengotow/PSDWriter

Enjoy!

like image 20
Ben Gotow Avatar answered Oct 23 '22 02:10

Ben Gotow