PIL or Photoshop: What's better for image editing?

I am trying to script a composite function and I am wondering if I would be better off using Pillow or Photoshop? I have tried using PIL’s composite function before and had difficulty getting it to execute the way I wanted. I am just learning about the psd-tools package for image editing. Any scripting geeks on here have any advice for me on what’s better, or any pointers on what to watch out for?

psd-tools is read support for .psd files, and needs Pillow to be able to work. Pillow is a good package for image editing through scripting, and in my view supersedes PIL.

/Nathan

1 Like

Thanks for clarifying. I am probably going to go ahead and use Photoshop. How is PIL different from Pillow?

So, maybe my understanding is egregiously wrong here, but my idea is that using PIL will not rely on opening any external application, whereas using psd-tools/Pillow will call Photoshop. If this is the case, will render times be affected in the event that I use Photoshop?

Please read the About Pillow document for further information on Pillow vs PIL. The same documentation will tell you more about technical differences.

psd-tools itself is a PSD file parser. It does not rely on Photoshop.

/Nathan

1 Like

Hi Bhupati,

For what it is worth: have a look at GIMP http://www.gimp.org/.
It’s an open source image editing software similar to Photoshop.
There are many options to automate and script and might be of use to you.

some references:


http://www.gimp.org/docs/python/

HTH
-Willem

1 Like

Thanks much, @Willem for these resources! I did come across GIMP scripting a couple times in my research, but I was a little scared when I read that using the GIMP Python plug-in is not really useful. What would you say are the advantages of using GIMP scripting over PIL? Just FYI, I’m well aware of GIMP application (and really love it), just not for scripting :-]

One of the challenges I find with PIL is trying to simulate application-based commands and buttons using PIL methods. To give an example, if I want to create a layer mask and then make it the Depth Map source (available as an options in Lens Blur), you could do that on Photoshop. Now to simulate the same effect on PIL has been challenging; I’m left to wrangle with (albeit very powerful but not visually intuitive) functions such as putalpha(), composite(), image modes, etc.

P.S. If I only had a better grasp of VB Script, I guess I could script this easily on Photoshop without all this complainin’!

I cannot answer that question, as I have little to no experience with either in regards to automating/scripting it.
It was just a pointer for you to maybe be of use. Personally I would prefer to use Gimp over Photoshop due to it being open source.

Can you elaborate on the type of application you are working on, in what way is it related to Rhino?

-Willem

(Sorry, I should have addressed this in my question.) I am adding a composite function to my Rhino batch render script. All it does is composite the beauty pass and the ZDepth pass to create the DOF effect.

Just to make sure: Are you aware of Rhino being able to do 2 types of DOF:

and

-Willem

1 Like

It’s hard to say, because different types of editing are more suitable for different types of editing. For the most part, I prefer Photoshop, I also use Lightroom, in which I prefer editing black and white photos. Fix red eye on retouchme a couple of times, it’s also quite useful, especially if you don’t have access to a PC.