0

I regularly batch export images from Photoshop using the Image Processor Pro add-on by Russell Brown. I export a folder of Photoshop files into 6 formats: 3 different resolution JPG and 3 different resolution PNG. The add-on also adds copyright information and adds a prefix to the file name.

Exporting PNG files from Photoshop is extremely slow and according to some sources, this is unique to Photoshop. I do understand that smaller PNG files require higher compression which takes longer. However:

  • In this post user Cristóbal Vila says that exporting a file as PNG from Photoshop takes 100s, while Affinity Photo takes 5s to do the same job, with the same result.
  • This post seems to indicate that in some situations, LightRoom can export PNGs' very quickly, while Photoshop is a lot slower by comparison.

Just for clarity, I'll provide an example of exporting my batch of images using Photoshop as above. I have 7 Photoshop files, each around 20-30MP and all include an alpha channel. It takes 40 minutes to export those, and when monitoring the export, the JPG images are produced in little more than a couple of seconds then it takes a few minutes for the progress bar to finish when exporting PNG. This is the same when using the add-on or using Photoshop's built in PNG export. Exporting a single file as high res PNG takes just over 5 minutes.

I've never used ImageMagick before or I would test this myself. Can anyone tell me if ImageMagick can convert PSD files to PNG faster than Photoshop? If so, I'll try and work out how to replicate my batch export in ImageMagick and use that, but as far as I see the only advantage in learning to use it is if there is a time saving.

UPDATE:

  • Further to comments I thought I'd include hardware: 2017 Lenovo P50 with 32GB RAM, Core i7-6700, 2GB Nvidia M1001M GPU. Windows 10 v1909. Latest drivers, Photoshop CC 2019.
  • On further testing I can export a PNG quickly (15-20s) in Photoshop using the Quick export as PNG option or the Export as options but the problem is that neither of these can be recorded into a macro action, so I can't use it to efficiently batch process a folder of images. Before using the Image Processor Pro add-on, I used to have a macro set up to do the same thing - it would resize down to the resolution, export as PNG using the Save for web option (the only way to record export in a macro) and then do the same again in a smaller resolution. This took just as long to export as it does now with the add-on.
  • As mentioned in the comments, I can't test this myself as I don't know how to use Imagemagick - If anyone can help me with the script to use to run a fair test and compare with Photoshop that would be excellent.
  • Any suggestions gladly accepted.
  • 1
    Why don't you just give it a try? Imagemagick is free. If PS needs 100seconds to export a png highly depends on the computer and the PSD file to begin with. If you are low on resources, IM has a good chance to outperform PS. However, the quality of your output file might vary as well. Just give it a try. – Kai Mattern Aug 4 at 9:43
  • 1
    Hello @KaiMattern - I'm on a 2017 Lenovo P50 with 32GB RAM, Core i7-6700, 2GB Nvidia M1001M GPU. Windows 10 v1909. Latest drivers, Photoshop CC 2019. Enough other users have reported this behaviour on forums to make it seem normal for Photoshop to take this long. So I don't think it's a lack of hardware exactly. – 5Diraptor Aug 4 at 9:58
  • 1
    @KaiMattern - I've just done a test: when I export one of my photoshop files using "Quick export as PNG", no progress bar appears, but it took 18seconds before it appeared in the folder, so I'm guessing it exports behind the scenes somehow. Using the "Export As" option takes around 20s – 5Diraptor Aug 4 at 10:03
  • 1
    If you go to this page and download Imagemagick: imagemagick.org/script/download.php I will write an example later. Make sure you download V7 as it overcomes a Windows program name clash and let it add Imagemagick to the environmental variables. You should not need "Legecy programs" – Bonzo Aug 4 at 11:25
  • 1
    Thanks @Bonzo I'd really appreciate that. I've downloaded and installed now. – 5Diraptor Aug 4 at 11:46
2

There is an imagemagick section to Stackoverflow and any follow up should go as a new question there?

magick "E:\Pictures\input" -write mpr:image +delete ^
( mpr:image -thumbnail x480 -write "E:\Pictures\480_wide.jpg" ) ^
( mpr:image -thumbnail x250 -write "E:\Pictures\250_wide.jpg" ) ^
( mpr:image -thumbnail x100 -write "E:\Pictures\100_wide.jpg" ) ^
( mpr:image -colorspace Gray -write "E:\Pictures\black_white.jpg" ) NULL:

There are other methods to do the same thing and one of them may be quicker.

Line 1: This reads the image in, saves it to memory with the name "image" and deletes the image from the command queue. Other lines: The image is read from the memory, modified and saved.

If you want to use the Imagemagick method it can be saved as a batch file on your desktop where you drag and drop the image to be modified over the icon. Of course you would need to change the hard coded paths to variables.

Edit:

Following on from xiota's comment you should only need the first layer of the PSD as iot contains all the other layers; so input.psd[0]

| improve this answer | |
  • Hello Bonzo, this answer wasn't quite what I had in mind as I was looking at PNG files, but I checked documentation and figured it out... Short answer is I can cut exporting time from Photoshop by almost 75%!. Thanks! – 5Diraptor Aug 5 at 13:37
  • 1
    The first layer contains a flattened copy of the image if "maximize compatibility" is selected. People may choose otherwise if they desire to save disk space, speed-up file save times, and don't realize they may someday wish to use third-party utilities to convert formats. See Adobe: File Formats in Photoshop – xiota Aug 5 at 15:36
  • Glad it works @5Diraptor; my post was more of an example and as I say if you want more info there is a Stackoverflow Imagemagic section. Imagemagick is not always fast but there is a lot you can do with it. – Bonzo Aug 5 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.