Live data from Hacker News

Psd.rb

layervault.tumblr.com

81–90 of 94 posts

Re: Psd.rb

#81
post #71

Earlier quoted context omitted.

A shameless plug: you can give https://github.com/kmike/psd-tools a try. I've read PSD.rb docs and a bit of its code; the implementation is one of the best and complete I've seen (I've checked almost all PSD reader implementations some time ago). But it seems that psd-tools is mostly on par with PSD.rb. It also have some features that PSD.rb doesn't have, e.g. full support for 'zip-with-prediction' compression, inclu…

Nice! We should work together.

Thanks!

Feel free to steal anything: test PSD files, etc.

If you want to implement layer blending in PSD.rb (required if you want to be able to export layer groups as images) then check libpsd C library - I think it has the most sophisticated open-source PSD blending implementation available.

Your PSD.rb and https://github.com/layervault/psd-enginedata libraries are very nice too; unfortunately I'm busy with other projects now, but maybe somebody will take effort and port PSD.rb features to psd-tools, or I could do this in future - the LayerVault's code will be very helpful.

Re: Psd.rb

#82
post #72

Earlier quoted context omitted.

> Unfortunately psd.py doesn't seem to exist. This is just plain wrong. There are many Python readers for PSD format: * https://github.com/kmike/psd-tools * https://github.com/jerem/psdparse * https://code.google.com/p/pypsd/ * PIL and Pillow can read PSD files. I'm biased because I wrote psd-tools, but I think psd-tools API is quite simple, and it has some features that PSD.rb doesn't have, e.g. it supports more PSD…

Nice. Obviously I didn't look too hard hence "doesn't seem to exist". My main point was against reimplementing something already extant just because you have a swathe of code in a given language.

Your point applies more to PSD.rb then - there was a lot of PSD readers in Python, C, C++ and C# for ages :)

But it seems that reimplementing worked very well for them: API, language and a good timing really matters.

Re: Psd.rb

#83
post #67

Is this more feature complete (esp. regarding to newer PS versions) than e.g. libpsd? http://sourceforge.net/projects/libpsd/

libpsd and PSD.rb both have features that the other doesn't have. For example, PSD.rb parses text/font data, while libpsd can handle images with zip compression.

libpsd was actually a great reference in building PSD.rb, especially since it was correct during the times that the actual file spec was wrong and more explicit in the type of data being read.

Re: Psd.rb

#84
post #80

Earlier quoted context omitted.

I checked out psd-tools and it's good. Any chance of you adding their features to yours or vice versa? I know I know, I should do it myself and do a pull request, but just asking if you are planning to?

Unfortunately I'm currently very busy with other projects, so I probably won't implement PSD.rb features myself anytime soon. I'm trying to provide feedback for psd-tools pull requests, merge them and release new psd-tools versions in timely manner; the testing suite also helps here, so you know, pull requests are welcome :) Most improvements over last 6 months came from pull requests submitted by other great people.…

I didn't check your codebase (I just used the library for a few projects a while ago), so you don't have to answer. But if you want to enlighten others as well as me; am I right in thinking that you have a reader while reads the file and then have a 'decoding module' for every blob. So it would be rather straight forward to port from Ruby such a decoding part and plug it into your library?

Re: Psd.rb

#85
post #80

Earlier quoted context omitted.

Unfortunately I'm currently very busy with other projects, so I probably won't implement PSD.rb features myself anytime soon. I'm trying to provide feedback for psd-tools pull requests, merge them and release new psd-tools versions in timely manner; the testing suite also helps here, so you know, pull requests are welcome :) Most improvements over last 6 months came from pull requests submitted by other great people.…

I didn't check your codebase (I just used the library for a few projects a while ago), so you don't have to answer. But if you want to enlighten others as well as me; am I right in thinking that you have a reader while reads the file and then have a 'decoding module' for every blob. So it would be rather straight forward to port from Ruby such a decoding part and plug it into your library?

Yes, that was the idea.

The whole process is divided into 3 stages: reading, decoding and providing "user-facing API":

- on "reading" stage PSD file is read and split into binary blobs (I think this part is done);

- on "decoding" stage "decoding modules" are called for each binary blob; decoding modules should produce Python data structures that closely resembles internal PSD format;

- on "user API" stage decoded data is converted to more convenient format that is easier to work with (e.g. this include building layers hierarchy, and the PSDImage/Layer/etc classes).

I hope that providing new decoders will be rather straightforward, and it seems to work this way so far: contributors haven't touched "reader" part, and I haven't touched it for a while as well. But software development is hard, so we can never be sure :)

Re: Psd.rb

#86
post #80

Earlier quoted context omitted.

Unfortunately I'm currently very busy with other projects, so I probably won't implement PSD.rb features myself anytime soon. I'm trying to provide feedback for psd-tools pull requests, merge them and release new psd-tools versions in timely manner; the testing suite also helps here, so you know, pull requests are welcome :) Most improvements over last 6 months came from pull requests submitted by other great people.…

I didn't check your codebase (I just used the library for a few projects a while ago), so you don't have to answer. But if you want to enlighten others as well as me; am I right in thinking that you have a reader while reads the file and then have a 'decoding module' for every blob. So it would be rather straight forward to port from Ruby such a decoding part and plug it into your library?

[deleted]

Re: Psd.rb

#88
post #17

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.

Wow, everything old, is new again ;) I think with an actual copy of Photoshop, and a little Applescript, this is something you could have done > 15 years ago.

  $ pacman -S applescript
  error: target not found: applescript
  $ pacman -S photoshop
  error: target not found: photoshop
  $ ruby --version
  ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
Hm, which of those can I use?

Re: Psd.rb

#90
post #48

Does anyone else think it's weird that they decided to make this library in Ruby? It drastically cuts down on the audience. Why not C/C++ with wrappers for all the dynamic languages? EDIT: nevermind, it makes sense now that I see their main product is a version control system for designers. Still, it would be nice to see this ported to native code some day.

as a programming language fan, i've never found anything as productive as ruby. it may not be the fastest language out there, and it may not have a bunch of static safety guarantees, but for exploratory programming it's pretty much unparalleled. if i were tasked with making a psd reader, i'd definitely do it in ruby first and then port it over to whichever language the client called for.
Post reply on HN