Skip to main content
Inspiring
October 3, 2021
Question

Bulk PNG export with Adobe Bridge and Photoshop - a field report

  • October 3, 2021
  • 1 reply
  • 4515 views
For a web-project, we have prepared thousands of PSD files – they all should get exported as PNGs with transparent backgrounds. We planned to use the Export Panel in Bridge for bulk-export – it has a quite useful feature set for this sort of task. Unfortunately, our PNG export failed notoriously ("unsupported file format"). Only JPGs exported fine via Export Panel.
 
After a chat with Adobe support, an Adobe employee checked my computer via remote session. He couldn't solve the problem. While troubleshooting, he deleted my Bridge preferences without asking and after some time simply left the session without a word. He let an old version of Bridge installed, which he had downloaded for testing. A very unpleasant experience – and as became evident later – a quite embarrassing appearance for a service technician as well.
 
As using the Export Panel still seemed no option, I wrote a simple PS-Action and exported my PNGs from Bridge, with the Photoshop Batch command. This finally worked, albeit very slowly. Hundreds of files could take hours to export. Unfortunately, Adobe's faster converter (Export As) cannot be used in actions or scripts. Manually exporting the finished files (with Export As) was also not practical – and we further need Metadata in files, which Export As stripped while converting.
 
In my search for faster alternatives, I tried converters such as XN-Convert, Batch Photo and GraphicsMagick. All these apps failed with our PSDs – just like the Bridge Export Panel. The external tools either wrote no file at all or a white image. Wow...
 
During my research, I stumbled upon the information that Adobe Lightroom (which we don't use) can only read PSDs that have been saved in Photoshop with maximum compatibility. And gradually the reason we couldn't export with the Export Panel in Bridge dawned on me: Bridge, just like Lightroom, needs the composite-layer that is created when writing a PSD file with maximum compatibility. The composite-layer is invisible in Photoshop – but it makes the appearance of PSD files readable for many external programs.

The Maximize Compatibility Setting in Preferences.

 

Indeed, the composite-layer was the reason. Everything about my Bridge installation was fine. As soon as I feed files with maximized compatibility to the Bridge-Exporter, its PNG output worked fine – still terribly slow, but it no more threw errors. The external converters could also read the files with composite layers and save them many times faster than Bridge using multicore processing. 
 
Hurray, problem solved?
 
Not quite. Before starting the project, we carefully checked all methods for saving our PSDs and made a conscious decision in favour of PSD output without Maximized Compatibility turned on. We wanted to work with Adobe CC anyway - why then improve interaction with other programs? For us, file size was the most important criterion, however. If a single photo at full resolution was around 100 MB, the file size increased to more than 300 MB through the composite layer - which would triple the volume for each of our thousands of images. 
 
More local storage admittedly would have been rather cheap – but the cloud synchronization between our graphics workstations would have taken three times as long – for seemingly no good reason at all.
 
So, what to do?
Live with the situation and export from Adobe Bridge via batch action, even if it takes hours each time? Doesn't sound good.

Spend days to re-save all PSDs to Maximized Compatibility with an action? The Bridge Export Panel would start working – but still be very slow. The previously mentioned external converters, however, at this point also could handle these PSDs and convert much faster. The price to be paid would be an absurdly inflated file volume and performance loss in cloud-file-transfer.
 
Fortunately, during my research, I came across yet another option: Affinity Photo's batch converter. Thanks to parallel processing, the tool is at the forefront in terms of speed. Unlike tools like Imagemagick, however, Affinity can read layered PSDs with masks and adjustment layers. It can thus read and process image files without a composite layer
 
We now export our assets this way – in seconds or minutes. I only saw extremely few errors – I suspect because Affinity does not differentiate between opacity and fill in Blend Modes. In this case, one can simply re-export individual files directly from Photoshop. With a thousand files exported so far, I ran into this exactly once. 
 
As long as Adobe does not offer a high-performance export files stored in compact PSD format, conversion via Affinity Photo likely is the best possible alternative. Perhaps this report will help other users in a comparable situation.
 
--- 
 
If Adobe employees read along: Please work on the documentation of the Maximize Compatibility feature - especially in Photoshop. Explain in detail the effects of chosen presets - in the context of all relevant Creative Cloud programs and third-party programs. What you state currently is by far not enough.

 

What the Adobe Help files say about Maximize Compatibility. No word about Lightroom, no word about Bridge.

 
It is further unworthy of a program like Bridge to fail Exporting without a useful Error Message. It would have saved me from spendings days of searching for a solution if the Exporter had provided a proper error message: "The Export Panels requires Files saved with Max Compatibility. You can Bulk Export files without Composite Layer via the Batch Command." 
 
Finally, work on the qualification of your support staff. It's hard to believe that a technician didn't even consider checking PSD file format preferences.
This topic has been closed for replies.

1 reply

rob day
Community Expert
Community Expert
October 3, 2021

Hi @polyxo , I wonder if a simple Save As Javascript would work for you. This asks for a folder of PSD files, creates a folder named PNGS in the same folder, and Saves a copy of the PSD as a PNG to the PNGS folder. Metadata and transparency were saved in my testing:

 

 

var f = Folder.selectDialog("Select the folder containing .PSD files"); 
if(f != null){ 
    fa = f.getFiles(/\.(PSD)$/i);
}

var pngF = Folder(f + "/PNGS")
pngF.create()
var so = new PNGSaveOptions();

for (var i = 0; i < fa.length; i++){
    var of = open (fa[i]);
    var n = of.name.replace(/\.[^\.]+$/, '');
    n = n+".png"
    of.saveAs(new File(pngF + "/" + n), so, true);
    of.close();  
}

 

 

Here‘s the script .jsx file:

 

https://shared-assets.adobe.com/link/3ed9f3b2-8563-4b85-5a55-97c981b8650c

 

polyxoAuthor
Inspiring
October 4, 2021

Thank you @rob day for sharing this script 👍

I have just tried it out – but I cannot spot performance gains over running actions which does the same thing. Like an action, the script can't run silently – but needs to open every file in Photoshop to perform the file-conversion. And it runs merely on one core. Consequently, the script is as slow as an action. It took me nearly 10 minutes to turn 4 sample PSDs (ca. 4000x4000 px each) files to PNGs. This would hardly be a way to output hundreds or even thousands of files in a row.

Manually exporting one of these sample files from Photoshop to PNG with Export As took less than 5 seconds to complete, and would take about 20 seconds for all 4 files. Compression is a lot better, files are far smaller than output with the regular Save As operation.

Running a batch job from Affinity Photo took 8 seconds in total for  the same set of 4 images, this method is even faster than Export As. The converter runs silently, without fully opening the PSD's. For those who haven't read the initial post – these are files saved without Composite Layer (Maximize Compatibility is turned off).

 

i7 6850K | GeForce 1070 | 32 GB RAM | M2 SSD with > 3GB write speed/sec | Win10

rob day
Community Expert
Community Expert
October 4, 2021

It took me nearly 10 minutes to turn 4 sample PSDs (ca. 4000x4000 px each) files to PNGs.

 

Something doesn’t sound right. I just tested four 4000 x 4000px PSDs, 10+ layers each and it took 5 secounds to convert all four to PNGs with the script. I’m running a 2019 iMac with 72GB of RAM.

 

I wonder if it is the metadata. There is a know problm with PS files accumulating excess history metadata, which can bloat files even on a conversion to another format. See these threads:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/inflated-jpg-file-size-photoshop-document-ancestors-metadata/td-p/8055434#8511978

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/photoshop-files-much-larger-than-usual/td-p/9023466

 

 

I have bloated metadata PSD sample, which has 1 empty layer and is only 1920x1080 px. Its Document Sizes in Phoshop read as 5.9MB/0 bytes, but the OS reads the saved file size as 60.3MB due to the bloat. If I include this file in my script test it does slow down the conversion by a considerable amount: