Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

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

Engaged ,
Oct 03, 2021 Oct 03, 2021
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.

polyxo_0-1633267370142.png

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.

polyxo_2-1633267370217.png

 

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.
4.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 03, 2021 Oct 03, 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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 04, 2021 Oct 04, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2021 Oct 04, 2021

If Affinity keeps the metadata I don’t see why you would bother with Photoshop.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 04, 2021 Oct 04, 2021
quote

If Affinity keeps the metadata I don’t see why you would bother with Photoshop.


By @rob day

Yes, the Affinity Exporter retains Metadata (optionally).

Indeed, I mainly wanted to share my experiences for fellow users in a similar situation. We thought that we were stuck in a dead end after saving many GB of PSD with Max Compatibility turned off. None of Adobe's Exporters can deal properly with this material...

  • The Bridge Export Panel fails altogether and doesn't even tell you why.
  • Save As (Action or Script) is painfully slow
  • Export As works well but is not available for Batch processing + it strips Metadata

Most 3rd party file converters, however, will fail as well. They need a composite layer to work. The Affinity Batch Exporter is the big exception, as it can fully interpret layered PSDs and uses all available CPU threads to convert.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2021 Oct 04, 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-docu...

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/photoshop-files-much-larger-than-usua...

 

 

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:

 

Screen Shot 17.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 04, 2021 Oct 04, 2021

That's interesting and new to me – but seems not to be the cause of my problem. Files only convert slow though Save As but they don't get overly large.

To rule this factor out I ignored that both PS Export As and the external tool can convert these files in seconds and removed all Metadata from the set of files I used earlier. Afterwards, I ran your script. Performance is unchanged – this time I measured the time 7.20min for 4 images (no improvement – last time I only estimated the time).

Manual PNG-Export through Save As (PNG) also takes tremendously long. One of my guesses was that Save As didn't like embedded RAW files in PSD. Another one was that 16-Bit colour depth might be an issue (your script retains the original colour depth).

But then I exported a second version where I applied sRGB and flattened the file (so that the RAW is gone), afterwards I converted the source PSD to 8 Bit per channel + alpha. Output – as expected – was quicker this time, but still took crazy long. If you want to have a look, here's one of the source-files, already without Metadata.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2021 Oct 04, 2021

this time I measured the time 7.20min for 4 images

 

Hmmm, I dupicated your sample PSD 4 times and my script did the 4 conversions to PNG in 8 sec. I’m not using the latest PS, my version is 2020 (21.2.2).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 04, 2021 Oct 04, 2021
quote

Hmmm, I dupicated your sample PSD 4 times and my script did the conversion to PNG in 8 sec. I’m not using the latest PS, my version is 2020 (21.2.2).

Interesting. You are not only using an older version, but you're also on Mac.

:light_bulb: I'll get the large File Transfer for all files ready, and you'll do the Export for me 😃. Only 100 GB...


Joking aside – I guess I will have to use the Affinity route until Adobe fixes this – and I'm afraid that I should not hold my breath until this happens. Just trying to downgrade PS and hoping that an earlier Windows version works for me doesn't sound like a good idea. The machine has no performance issues elsewhere. Thank you very much for testing!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2021 Oct 04, 2021

Just trying to downgrade PS and hoping that an earlier Windows version works for me doesn't sound like a good idea

 

You should be able to download 2020 and run it without uninstalling 2021.

 

I assume you are opening from and saving to the startup or a local drive?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 04, 2021 Oct 04, 2021
quote

You should be able to download 2020 and run it without uninstalling 2021.

 

Well, I already have a way to export which is very fast. I would prefer sticking to Photoshop but installing a secondary instance of a multi GB program only for exporting – without any evidence that it works on my OS – to me seems over the top. I don't see how this could fit our process here, we're working from several workstations (all Windows).

quote

I assume you are opening from and saving to the startup or a local drive?

 

It's a very fast local drive, yes. This drive syncs with Dropbox, but everything is local. I have already tried exporting from the startup drive (not synced with Dropbox, same type of ssd) but it's equally slow.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 06, 2021 Oct 06, 2021

@rob day 

Thanks again for your input on Export Speed with my sample file. I would be curious what fellow Windows users on the last version of Photoshop see. My share link still works...

I seem to have the PNG Export stuck at 99 % problem. There are numerous reports, but I haven't seen a fix yet. Indeed, I see the export progress rapidly reach 99% but the last percent may take minutes to complete.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2021 Oct 06, 2021

we're working from several workstations (all Windows).

 

Does the problem happen on all of your Windows machines?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 06, 2021 Oct 06, 2021
LATEST

Does the problem happen on all of your Windows machines?

I have not tested this so far (remote office), but it would be interesting to know. Unfortunately, you were the only one who ran a test with my file.

 

The machine which doesn't work well (with Adobe Exporters) is the one which is the one we want to use to output files. All Desktop machines, it would be a pain to change the pipeline. At this point, we were better off using the Affinity route.

 

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines