I just wrote a script with this that takes a directory of PSDs and outputs PNGs for each one. It took about 2 minutes. This is great.
Psd.rb
31–40 of 94 posts
Re: Psd.rb
#32I feel like this could be used to automatically convert a simple .psd web layout to non-shitty HTML and CSS.
Look up markupwand.com an YC alumni. The problem is harder than it looks. Now, I am not an expert in PSD format but a PSD that can be automatically converted to HTML has to be specifically formatted. For example, if you merge text layers with image layers, it becomes difficult to extract the information.
markupwand.com is pivoting...
Re: Psd.rb
#33This programmer has written about the PSD format in colorful detail: "Trying to get data out of a PSD file is like trying to find something in the attic of your eccentric old uncle who died in a freak freshwater shark attack on his 58th birthday." https://code.google.com/p/xee/source/browse/XeePhotoshopLoad... (ref: first link in the article)
I think that comment itself was posted on HN or somewhere -- I know I've seen it before.
Re: Psd.rb
#34>Adobe has never produced an easy way for developers to work with the format. That's not entirely fair. Adobe has openly released a comprehensive description of the format which is, as far as I know, accurate. The problem is that the format itself is a heap of features piled on year after year with apparently no regard for doing things consistently.
But seriously, this kind of back-compatibility horror is the hallmark of success, where success means enduring.
Re: Psd.rb
#35Earlier quoted context omitted.
But this way I don't have to keep paying $20/mo to Adobe CC so that I can run the script again next month.
I suspect that you could probably also manage it with GIMP/guile, but I don't suspect it would be particularly pleasant.
If you just want to do basic conversion ignoring layers, it's quite easy:
for f in *.psd; do
convert "$f" "${f%%.psd}.png"
doneRe: Psd.rb
#36This programmer has written about the PSD format in colorful detail: "Trying to get data out of a PSD file is like trying to find something in the attic of your eccentric old uncle who died in a freak freshwater shark attack on his 58th birthday." https://code.google.com/p/xee/source/browse/XeePhotoshopLoad... (ref: first link in the article)
Re: Psd.rb
#37Re: Psd.rb
#38Earlier quoted context omitted.
But this way I don't have to keep paying $20/mo to Adobe CC so that I can run the script again next month.
I suspect that you could probably also manage it with GIMP/guile, but I don't suspect it would be particularly pleasant.
Re: Psd.rb
#39Earlier quoted context omitted.
Look up markupwand.com an YC alumni. The problem is harder than it looks. Now, I am not an expert in PSD format but a PSD that can be automatically converted to HTML has to be specifically formatted. For example, if you merge text layers with image layers, it becomes difficult to extract the information.
> The problem is harder than it looks. markupwand.com is pivoting...
Re: Psd.rb
#40I just wrote a script with this that takes a directory of PSDs and outputs PNGs for each one. It took about 2 minutes. This is great.
Great, however, that was possible with ImageMagick before. Even more: ImageMagick can extract PSD layers as separate PNGs.