You are not logged in.

#1 2010-11-29 08:58:51

Olnex
Member
Registered: 2008-04-10
Posts: 89

Batch convert PSD to PNG

I am looking for a way to convert a lot of PSD files to PNG format, is there any application or command or script can do this? I also need to resize them when converting.

Thanks a lot!

Offline

#2 2010-11-29 09:48:50

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: Batch convert PSD to PNG

I think you can use the convert program that ships along with imagemagick. I believe something like the following should suit your needs.

#!/bin/bash
for i in *psd
do
    name=${i%.psd}
    convert "$name.psd[0]" -scale XxY "$name.png"
done

The [0] is required. Otherwise convert will convert every single layer into a separate png file. More documentation about imagemagick here

Last edited by Foucault (2010-11-29 09:51:36)

Offline

#3 2010-11-29 13:16:33

nXqd
Member
Registered: 2010-07-01
Posts: 173

Re: Batch convert PSD to PNG

Foucault wrote:

I think you can use the convert program that ships along with imagemagick. I believe something like the following should suit your needs.

#!/bin/bash
for i in *psd
do
    name=${i%.psd}
    convert "$name.psd[0]" -scale XxY "$name.png"
done

The [0] is required. Otherwise convert will convert every single layer into a separate png file. More documentation about imagemagick here

Amazing to know there's such an amazing image tool like imagemagick on linux. Beside psd convert, there're a lot of magic uses with imagemagick


When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles

Offline

#4 2010-11-30 02:49:40

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Batch convert PSD to PNG

For future reference, it can be done with GIMP as well through one of the scripting interfaces (I recommend Python) or C plugins. It's not as fast as imagemagick when scripting, but it's far more powerful if one wants to leverage its depth. I do recommend imagemagick for fast, high quality batch jobs. As well, GIMP still lacks high color support, so if that's a real problem, then imagemagick is the better choice.

--EDIT--

That's deep color support, not high color support.

Last edited by skottish (2010-11-30 03:10:58)

Offline

Board footer

Powered by FluxBB