TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

"I think you will all appreciate this person's commenting style"

516 pointsby ahalanover 12 years ago

16 comments

saurikover 12 years ago
PSD was never intended to be a data interchange format: it is the serialization format of a single program that has more individual unrelated features that actual people rely on than almost any other piece of software and has maintained striking amounts of backwards compatibility and almost unbroken forwards compatibility during its over two decades of existence. This product's "file format" needs to be critiqued in this context, along with similar mega-programs like Office.<p>I am thereby having a difficult time fathoming why anyone would think that a PSD file is thereby going to be some well-organized file format that they should easily be able to parse from their own application is just naively wishful thinking: even other products from Adobe have limitations while opening these files; to truly manipulate these files you really need to be highly-compatible with Photoshop's particular editing model (hence the conceptual difference between these two classes of file format).
评论 #4747161 未加载
评论 #4747067 未加载
评论 #4747603 未加载
评论 #4747655 未加载
评论 #4747682 未加载
评论 #4747706 未加载
评论 #4746961 未加载
评论 #4748365 未加载
评论 #4747764 未加载
gjm11over 12 years ago
Has been on HN before (<a href="http://news.ycombinator.com/item?id=575122" rel="nofollow">http://news.ycombinator.com/item?id=575122</a>) but it was years ago. I mention this just in case others are having the same feeling of deja vu as me.
评论 #4747375 未加载
评论 #4751341 未加载
greggmanover 12 years ago
I'm pretty sure the PSD format chucks are based off IFF spec from 1985<p><a href="http://www.martinreddy.net/gfx/2d/IFF.txt" rel="nofollow">http://www.martinreddy.net/gfx/2d/IFF.txt</a><p>Things were padded to 4 byte boundries because the 68000 processor would crash if you read an unaligned 32bit value. So the length of the actual data was what you find in the size field of each chuck but each chunk is padded. That way you didn't have to work around the 68000 quirks and read a byte at a time.<p>I wrote a psd reader in 93. It wasn't that hard and still works today. Maybe I chose an easy subset. It only reads the original result (merged layers) that gets saved when you chose to save backwards compatible files in photoshop.<p><a href="http://elibs.svn.sourceforge.net/viewvc/elibs/trunk/elibs/lib/echidna/photoshp.c?revision=97&#38;view=markup" rel="nofollow">http://elibs.svn.sourceforge.net/viewvc/elibs/trunk/elibs/li...</a>
评论 #4748109 未加载
评论 #4747727 未加载
runn1ngover 12 years ago
John Nack replied to this 3 years ago on his blog.<p><a href="http://blogs.adobe.com/jnack/2009/05/some_thoughts_about_the_psd_format.html" rel="nofollow">http://blogs.adobe.com/jnack/2009/05/some_thoughts_about_the...</a>
hcarvalhoalvesover 12 years ago
I appreciate the first code comment more after the introduction:<p><pre><code> if(sign!='8BIM') break; // sanity check </code></pre> "Sanity check" as in "let's make sure it's really a PSD before we go insane".
drivingmenutsover 12 years ago
So, I guess embedding a PSD in a DOC file is like putting a Bag of Holding in a Portable Hole?
bitwizeover 12 years ago
And yet to be considered a non-toy image editor, you must support 100% of this format perfectly.
simula67over 12 years ago
Many more for your viewing pleasure : <a href="http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered" rel="nofollow">http://stackoverflow.com/questions/184618/what-is-the-best-c...</a>
评论 #4747942 未加载
评论 #4747952 未加载
felipcover 12 years ago
One of my favorite blog posts from Joel Spolsky talks about this, basically explaining how these formats come to be. For mega-softwares like those, the source code is the de facto file spec www.joelonsoftware.com/items/2008/02/19.html
smosherover 12 years ago
This reminded me of just how nice the Doom WAD format is: <a href="http://doomwiki.org/wiki/WAD" rel="nofollow">http://doomwiki.org/wiki/WAD</a><p>When a friend complained that he had a hard time figuring out which maps were present in a given WAD, I enjoyed myself while writing a utility to organize them into directories with map numbers. I kept thinking: this is how you serialize data. Looking back on the code now, it's still easy to understand.
brendandahlover 12 years ago
If he thinks PSD is bad he should try PDF which is really about 30 inconsistent formats all packaged into one inconsistent format.
dschiptsovover 12 years ago
This is much better reason to hire a person than 10 resumes.)
flebronover 12 years ago
I like the 'sanity check' at the bottom. :)
评论 #4751644 未加载
drp4929over 12 years ago
Is this a comment or rant ?
评论 #4747775 未加载
评论 #4750818 未加载
评论 #4747237 未加载
unix-dudeover 12 years ago
lol'd hard.
joshkaover 12 years ago
Whilst I enjoy jwz's writings, please follow the hacker news guidelines which can be found at <a href="http://ycombinator.com/newsguidelines.html" rel="nofollow">http://ycombinator.com/newsguidelines.html</a><p>In particular: Please submit the original source. If a blog post reports on something they found on another site, submit the latter. The original source is <a href="https://code.google.com/p/xee/source/browse/XeePhotoshopLoader.m#102" rel="nofollow">https://code.google.com/p/xee/source/browse/XeePhotoshopLoad...</a><p>Also: Please use the original title, unless it is misleading or linkbait.
评论 #4747324 未加载
评论 #4747129 未加载
评论 #4747184 未加载
评论 #4751029 未加载