Create and edit the .psd file on the iPhone file system

I was wondering what is the easiest way to make a .psd file from an iPhone application. I am creating an application as a Layers application and I cannot understand how it makes and edits .psd files.

+6
source share
5 answers

Checkout ImageMagick . There, iOS compiled a binary file that you can link in your application. Or, if you want, you can customize the compilation business yourself.

+3
source

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

// 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, find the open source psd read / write library.

+13
source

I am the author of the Layers application mentioned in OP. Unfortunately, coneybeare is right - I pretty much wrote an objective-c implementation from scratch. The trick turned out to be based on a very old version of the PSD specification, before it was insanely dirty with crap. Layers actually write Photoshop 3 files.

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

Enjoy it!

+3
source

They probably looked at the specification for the psd format and then figured out how to record it manually.

+1
source

A similar question was asked a few months ago; the only answer gave some information about PSD parsers for C / Objective-C:

API for analyzing PSD files

+1
source

Source: https://habr.com/ru/post/886516/


All Articles