TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

516 点作者 ahalan超过 12 年前

16 条评论

saurik超过 12 年前
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 未加载
gjm11超过 12 年前
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 未加载
greggman超过 12 年前
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 未加载
runn1ng超过 12 年前
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>
hcarvalhoalves超过 12 年前
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".
drivingmenuts超过 12 年前
So, I guess embedding a PSD in a DOC file is like putting a Bag of Holding in a Portable Hole?
bitwize超过 12 年前
And yet to be considered a non-toy image editor, you must support 100% of this format perfectly.
simula67超过 12 年前
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 未加载
felipc超过 12 年前
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
smosher超过 12 年前
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.
brendandahl超过 12 年前
If he thinks PSD is bad he should try PDF which is really about 30 inconsistent formats all packaged into one inconsistent format.
dschiptsov超过 12 年前
This is much better reason to hire a person than 10 resumes.)
flebron超过 12 年前
I like the 'sanity check' at the bottom. :)
评论 #4751644 未加载
drp4929超过 12 年前
Is this a comment or rant ?
评论 #4747775 未加载
评论 #4750818 未加载
评论 #4747237 未加载
unix-dude超过 12 年前
lol'd hard.
joshka超过 12 年前
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 未加载