TransWikia.com

Does ImageMagick export PNG faster than Photoshop?

Photography Asked on February 3, 2021

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.

One Answer

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

magick "E:Picturesinput" -write mpr:image +delete ^
( mpr:image -thumbnail x480 -write "E:Pictures480_wide.jpg" ) ^
( mpr:image -thumbnail x250 -write "E:Pictures250_wide.jpg" ) ^
( mpr:image -thumbnail x100 -write "E:Pictures100_wide.jpg" ) ^
( mpr:image -colorspace Gray -write "E:Picturesblack_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]

Answered by Bonzo on February 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP