5 ms·
“PSD is not a good format”
- jmartinpetersen 12y agoThe code (and comment) is five years old. Any updates on how the PSD format has changed (if at all) since then? Also, the title used here isn't actually a quote from the link. I'd opt for the closing sentence "PSD is not my favourite file format" instead ...
- detaro 12y agoAs far as I know PSD hasn't had a "reset", but only incremental features, and compatibility has been good, so I'd expect that not much has changed. Only user perspective though, I haven't looked at the format itself. Since compatibility is quite important in this case, I don't really expect big changes though. Adobe has a working code base and documentation for it, so there likely is no incentive to risk change.
- toephu2 12y agoit is a quote from the link, look at the 2nd line of the comment
- detaro 12y agoThe title got changed, the original title wasn't.
- kmike84 12y agoIn modern PSD files a lot of information is stored in "descriptors"; they are all parsed in an uniform way. Some of the information (like font data) is in undocumented "Raw Data" descriptors though. The official PSD specs are now online: http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/. Specs don't provide information about all PSD features, but they are a good start. As I recall, an initial version of https://github.com/kmike/psd-tools https://github.com/kmike/psd-tools took a weekend; I was following specs, using PIL (Pillow) for pixels handling; also, I was checking other PSD readers when something was unclear - there is a lot of open-source PSD readers. Earlier readers are from 2005 or maybe earlier, they have been available long before the code with this "famous" comment was written.
- deleted 12y ago[deleted]
- 300bps 12y agoLooks like a typical rant from a junior developer. More experienced developers realize why decades-old file formats are they way they are and when needing to work with them, adapt themselves to it.
- _almosnow 12y agoYeah it's easy to say "I could've done this better" without thinking about it too much. I'm pretty much that the things guys like this are programming now (assuming they are going mainstream which I HIGHLY doubt) will be seen as cryptic and really naive when a programmer from 2036 looks into them.
- harry8 12y agoYour comment sort of looks a bit like a senior developer who hasn't, you know, really achieved as much as they might have striking a pose against these pesky juniors who whatever else you think of them, really get some things done. When you battle the darkness and smite it to get something working pretty well you have a right to do a little bit of editorializing in a comment. If you choose not to and save the rant for the bar on Friday evening or a blog post, that's ok too. Of course looks can be deceptive and either or both of us could be wrong about how things "look." Me? I appreciate a heartfelt "here there be dragons" in source with some reasoning and description, I may be too junior for your tastes. ;-)
- Doctor_Fegg 12y agoFamous riposte by John Nack of Adobe: http://blogs.adobe.com/jnack/2009/05/some_thoughts_about_the_psd_format.html http://blogs.adobe.com/jnack/2009/05/some_thoughts_about_the... One quote worth picking out: "Wouldn’t it be better if all apps could read/write just one common interchange format? That’s just what Adobe is developing with FXG." Come 2015, and FXG appears to be dead and buried.
- AndrewKemendo 12y agoWouldn’t it be better if all apps could read/write just one common interchange format? As an aside this is what FBX is trying to be for the CAD world. http://www.autodesk.com/products/fbx/overview http://www.autodesk.com/products/fbx/overview
- forgottenpass 12y agoI don't get that response at all. The rant was obviously written in frustration, I wonder why it touched such a nerve at Adobe. If that's the classed up version for a corporate blog, how did they really feel? Maybe I've had ego about products beaten out of me by tough internal code reviews of every line I've ever written, but I'm not afraid to admit to the parts of our product that suck, or shipped "good enough." The psd format hardly seems like a thing worth defending. And it's basically an admission the rant is right that attempts to soften it with some excuses.
- jacobolus 12y agoThe rant in the Xee source is IMO ignorant and not very useful. The Photoshop format has some warts, but for what it is, it’s documented well enough (better than many similar app-specific serialization formats), and most of the complexity is necessary to deal with various Photoshop features. The origin of PSD’s complexity is the low-level organization of Photoshop’s abstractions, which dates from the late 1980s and has become more and more unwieldy as Photoshop has gradually accreted features over its 25-year history. Complaints about PSD in this style basically amount to complaints that Adobe hasn’t ever tossed out backwards compatibility and done a rewrite from scratch on a cleaner set of abstractions. But there are obvious business reasons for them not to do that. I’ve had some experience parsing and working with the data inside the PSD format, and honestly, it’s not nearly so bad as this rant makes it sound. (Disclaimer: that’s coming from a baseline of 15 years of heavy experience as a Photoshop user.)
- JabavuAdams 12y agoMeh. It's old and complicated. I wrote a PSD dumper in 2013 so our artists could use Photoshop as a level editor. Interestingly, the Photoshop Javascript automation engine is so slow, that it was faster to parse the file in Python. Like a minutes-long export using Javascript in Photoshop took a second or so when dumping with Python for a file with 100 layers.
- kylec 12y agoWas PSD designed to be a portable format? My understanding is that it was only meant to be used directly by Adobe Photoshop, much like the original DOC was meant to be used only by Microsoft Word. As such, it's a little unfair to call it out as a bad format because it was never meant to be reverse engineered and reimplemented.
- Lai0chee 12y agoSo, this is the justification for having a horrible file format?
- frozenport 12y agoGo to Adobe board room, tell them about your great format that will empower artists to use their documents in competing applications.
- kylec 12y agoWhen engineering a file format, you have multiple competing priorities you need to balance, such as size of the resulting file, reading and writing efficiency, backward compatibility, etc. Since Adobe didn't anticipate using PSD as a generic file format for graphics applications, it wasn't necessary to design it that way, and I'm sure that other priorities prevailed instead. It's also a pretty old format, probably designed not just once but many times over the years by many people resulting in the inconsistencies the article talks about.
- wpietri 12y agoPhotoshop 1.0 is from 1988. This was the era of the Macintosh SE [1], the default configuration of which came with two floppy drives, but if you paid a lot more, you could a hard drive that had as much as 40 MB. And it could have an entire 4 MB of RAM. There are watches today that are 100x more powerful than Macs of that era. Almost anything that was good in a file format from that era would be bad today. Every novel and innovative application feature from Photoshop 1.0 would be seen today as trivial. Many of today's features would have been inconceivable. If you think you can do better, then I'd encourage you to try. Just start shipping an app with a file format today, get a lot of users, take it through 15 major versions [2], and come back to us in 25 years. Then you can lecture those of us left alive on the right way to do file formats. [1] http://en.wikipedia.org/wiki/Macintosh_SE http://en.wikipedia.org/wiki/Macintosh_SE [2] http://en.wikipedia.org/wiki/Adobe_Photoshop_version_history http://en.wikipedia.org/wiki/Adobe_Photoshop_version_history
- woodchuck64 12y ago“Most are the gradual result of discovering better ways to do things over 20 years, while staying compatible with older applications.” (PSD apologist Tim Wright) There is no force more destructive.
- tux3 12y agoCalling someone a "X apologist" is silly. You disagree with someone, awesome. That's not a reason to try to ridicule that person imo.
- phaemon 12y ago> Calling someone a "X apologist" is silly. Not if you know what the word "apologist" means (it has nothing to do with ridicule). Try using Google. Edit: dang has criticised my last sentence there, which is fair enough. It was meant as a dig. However, if you are unsure of the meaning of a word and are using either Firefox or Chrome, you can select the word, right-click, and choose "Search with Google" and Google will actually give you the definition for that word. It's a (relatively) new feature they've added. Also, search with "etymology" to find the origin of a word.
- dang 12y ago> Try using Google This comment would be strictly better without that final swipe. Please don't do that on HN.
- JoelHobson 12y agoI don't see that as ridiculing them. An apologist is someone who argues in defense of something. In this case, the PSD format. It seems apt here.
- eropple 12y agoI guess I gotta wave my "descriptive not prescriptive" flag a bit. =) You are, technically, correct. Hermes Conrad aside, technically correct is not the best kind of correct--"apologist" has nearly universally negative connotations in, well, modern English, here, now. It is used almost exclusively to characterize a position that the user of the word views as negative. And people who don't fall into that generality often are using the word in "defiance" of that generality, which kind of makes you wonder why, when words are used to communicate. It's also worth noting that at least some dictionaries characterize "apologist" as a defender of something controversial, which is a nod towards the real-world use of the term if you read into what they mean by controversial a bit. The world isn't an SAT test. Context always always always matters. (And, for extra context-matters, if you are now compelled, at the end of this post, to ask what a "Standard Aptitude Test test" is, I invite you to take a good long look at your life and ask yourself why you want to be That Guy because nobody likes That Guy.)
- dang 12y agohttps://news.ycombinator.com/item?id=6410821 https://news.ycombinator.com/item?id=6410821 https://news.ycombinator.com/item?id=575122 https://news.ycombinator.com/item?id=575122 and sundry others: https://hn.algolia.com/?q=psd#!/story/forever/0/psd%20format https://hn.algolia.com/?q=psd#!/story/forever/0/psd%20format
- Dru89 12y agoLooks like a total of 5: https://hn.algolia.com/?q=psd#!/story/forever/prefix/0/XeePhotoshopLoader https://hn.algolia.com/?q=psd#!/story/forever/prefix/0/XeePh... But yeah, I definitely remember seeing this in the past. Feels slightly like a case of http://xkcd.com/1053/ http://xkcd.com/1053/, though? And I don't see anything in the guidelines about re-posts. (https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html) You've got more HN experience than me, though, so I could very easily be wrong. :)
- dang 12y agoIt's in https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html. The rule of thumb is that reposts are ok after a year or so.
- bluedino 12y agoIs it anything like Microsoft Word where the PSD file is basically a dump of what Photoshop uses to represent the document in RAM? Could cause for some interesting differences between files created on a Macintosh vs Windows.
- wolfgke 12y agoBlender's .blend files are such memory dumps, too.
- kabdib 12y agoMwahaha. Kiddie stuff. Go try and read RTF some time. Try to convert it to HTML. Try to figure out how to extract tables. Oh, bugger. The best I can say about that experience is (a) I learned a lot about how legacy file formats grow, especially when they are supposed to be "open" but are really treated as proprietary ground for developers to stomp all over in metal-soled booties, and (b) the company that paid me to do that work is long, long out of business. The misery is long past.
- spdustin 12y agoI wrote an XSLT transformation for SharePoint that emitted an RTF doc that included tables a long while ago. Damn, I write a lot of that in anger. Another one for DocBook to RTF, for another client. Also written in anger. RTF is painful to try and reproduce rationally.
- aruggirello 12y ago> The misery is long past. With legacy apps, your miserable past is usually somebody else's nightmarish present... I had a funny - though unrelated - experience with RTF production a couple decades ago. To make things more interesting, we were using KnowledgeWare ObjectView for the job - a 16-bit RAD tool with a custom simil-VisualBasic syntax, and collecting data from a UNIVAC 1100. I moved to a different company about four years later, and later discovered ObjectView... oops, just ceased to exist. Phewwww! http://en.wikipedia.org/wiki/KnowledgeWare http://en.wikipedia.org/wiki/KnowledgeWare
- userbinator 12y ago> Why, for instance, did it suddenly decide that these particular chunks should be aligned to four bytes, and that this alignement should not be included in the size? Other chunks in other places are either unaligned, or aligned with the alignment included in the size. This sounds like a spec that grew organically, with multiple people contributing to it over the years; the alignment might've come from PowerPC/68k-based Macs, as also evidenced by the use of big-endianness throughout.
- Theodores 12y agoIs this problem being solved the best way? Is it not possible to build a plugin for Photoshop that exports an interim format, something where there are things like layers with text elements in something CSS friendly so that those people with familiarity with things like imagemagick can automate what they need doing in some sensible way? This need be a one-way export so those of us that have to do something with other people's Photoshop files can just get on with it. The import of the interim format (to Photoshop) need not be necessary for many workflows.
- detaro 12y agoThat still requires you to have Photoshop to do the initial export, at least until your new export format is an accepted standard (Photoshop files are de-facto exchange format in many areas, since everybody uses Adobe products anyways) If you already know that your workflow will leave Photoshop at some point and you control it fully I agree, that would be a solution (and might already be possible, depending on your exact needs)
- wging 12y agoPreviously: https://news.ycombinator.com/item?id=8831172 https://news.ycombinator.com/item?id=8831172 And previously: https://news.ycombinator.com/item?id=4746787 https://news.ycombinator.com/item?id=4746787