

Psd.js: A Photoshop Document Parser in CoffeeScript - devongovett
http://badassjs.com/post/16822405598/psd-js-you-guessed-it-a-photoshop-document-parser-in

======
DarkMeld
"No one likes Photoshop..."

I fucking love Photoshop

~~~
oneplusone
I think the coolness about hating Photoshop comes from Photoshop on Mac being
a 2nd class citizen. The Windows version of Photoshop is better in every way.
It is very stable and has an excellent UI (though a few of the older dialogs
could use an update).

The Mac version on the other hand is a pain in the ass to use. I operate at
about 70% efficiency when using the Mac over Windows version.

~~~
jonknee
Do you have any specifics? The UIs are very similar. They don't use the OS
widgets on either platform to keep things consistent and if you know one you
know the other. So much so that I'm not a fan of the Mac UI too much because
it feels like a Windows app.

------
alexobenauer
I tried out the demo, but it says "not a PSD file" for every PSD file I gave
it.

If it works, I would really look forward to this.

~~~
RandallBrown
Same problem. I'm using Safari on a Mac.

~~~
devongovett
Won't work in Safari because Safari lacks FileReader support. Try in Chrome or
Firefox.

------
qqqqqq
Well that's weird. I tried giving the demo a Photoshop CS5 file and it doesn't
like that. I thought maybe it was a parsing problem, since I remember there
being something about the latest Photoshops doing something to PSD's. PSD's
made in Photoshop 7 do not seem to work either.

I wonder what is going on? I've tried this on Chrome 16 and Firefox 10.

Well that's weird. I tried giving the demo a Photoshop CS5 file and it doesn't
like that. I thought maybe it was a parsing problem, since I remember there
being something about the latest Photoshops doing something to PSD's. PSD's
made in Photoshop 7 do not seem to work either.

I wonder what is going on? I've tried this on Chrome 16 and Firefox 10.

\-- Edit:

Oh, it looks like browsers don't appear to be sending the MIME-type. In fact,
there appears to be a lot of file types which I'm randomly throwing into
filereader that don't appear to have any MIME-type attached to them. How very
interesting indeed!

~~~
thristian
If I recall correctly, Adobe has not published PSD file-format specifications
for anything past Photoshop 6, so supporting anything newer than that is
likely to involve a lot of reverse-engineering and heartache.

------
tlrobinson
Little known fact: Photoshop (and most other Adobe apps) comes with a
JavaScript interpreter you can use to script it.

------
elliottcarlson
Unrelated to topic; Devon - the z-index of your static nav is below the discus
comments. Add a "z-index: 2" for the #navigation CSS and it fixes it.

~~~
devongovett
Thanks, fixed!

------
mikehuffman
Well, it would appear that this is indeed "bad ass js". I can't for the life
of me think of a way to use this, but it is very, very bad ass.

------
ghempton
Love the idea and want to use this, but crashed the browser when I tried a
simple psd.

------
DonnyV
Why CoffeeScript? Am I missing something or wouldn't have better performance
with straight javascript?

~~~
DougBTX
Why do you think there would be a performance aspect? The JavaScript generated
by the CoffeeScript compiler looks just like well written JavaScript. (But
without the comments, grumble grumble.)

~~~
rimantas
Try this:

    
    
      ###
      Your comment there
      ###

