Copy link to clipboard
Copied
The Maximize Compatibility Setting in Preferences.
What the Adobe Help files say about Maximize Compatibility. No word about Lightroom, no word about Bridge.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
If Affinity keeps the metadata I don’t see why you would bother with Photoshop.
Copy link to clipboard
Copied
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...
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.
Copy link to clipboard
Copied
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:
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:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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).
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
we're working from several workstations (all Windows).
Does the problem happen on all of your Windows machines?
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now