Skip to main content
Known Participant
March 11, 2024
Answered

PSB to PSD?

  • March 11, 2024
  • 2 replies
  • 1334 views

I have almost 100 psb files. they are slightly under 2 GB and have various content (eg different kind of layers and SmartObjects). Problem I have: Some customers report not being able to open those files. They need psds instead. (I don't know what programs they are using...)

Is there an easy way to batch convert my psbs to psds? ... I assume just renaming the file extansion won't help? (:

Thanks!

This topic has been closed for replies.
Correct answer Stephen Marsh

You can batch convert with an action. PSD is limited to 30K pixels on the longest canvas edge, while PSB supports 300K.

2 replies

Stephen Marsh
Community Expert
Community Expert
March 11, 2024

@kv43606971 

 

Perhaps this script will help:

 

/*
Batch Save PSB to PSD.jsx
v1.0 - 11th Marsh 2024, Stephen Marsh
https://community.adobe.com/t5/photoshop-ecosystem-discussions/psb-to-psd/m-p/14480985
*/

var originalRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
var inputFolder = Folder.selectDialog("Please select the input folder:");
var outputFolder = Folder.selectDialog("Please select the output folder:");
var fileList = inputFolder.getFiles(/\.psb$/i);
var fileCounter = 0;

for (var i = 0; i < fileList.length; i++) {

    open(fileList[i]);
    var docName = activeDocument.name.replace(/\.[^\.]+$/, '');
    var savePSDName = File(outputFolder + "/" + docName + ".psd");
    if (app.activeDocument.width.value > 30000 || app.activeDocument.height.value > 30000) {
        fitImage(30000, 30000);
        savePSD(savePSDName);
        activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    } else {
        savePSD(savePSDName);
        activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    }
    fileCounter++;
}

preferences.rulerUnits = originalRulerUnits;
alert('Script completed!' + '\n' + fileCounter + ' files saved to:' + '\r' + outputFolder.fsName);


function fitImage(fWidth, fHeight) {
    /* NEARESTNEIGHBOR | BILINEAR | BICUBIC | BICUBICSMOOTHER | BICUBICSHARPER | BICUBICAUTOMATIC */
    if (activeDocument.height.value > activeDocument.width.value) {
        activeDocument.resizeImage(null, UnitValue(fHeight, "px"), null, ResampleMethod.BICUBIC);
    } else {
        activeDocument.resizeImage(UnitValue(fWidth, "px"), null, null, ResampleMethod.BICUBIC);
    }
}

function savePSD(saveFile) {
    psdSaveOptions = new PhotoshopSaveOptions();
    psdSaveOptions.embedColorProfile = true;
    psdSaveOptions.alphaChannels = true;
    psdSaveOptions.layers = true;
    activeDocument.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
}

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Known Participant
March 11, 2024

wow, thank you! ❤️

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
March 11, 2024

You can batch convert with an action. PSD is limited to 30K pixels on the longest canvas edge, while PSB supports 300K.

Known Participant
March 11, 2024

will have to manually edit some of them for that reason I guess.... 😕😕

thanks for the quick reply!

Stephen Marsh
Community Expert
Community Expert
March 11, 2024

You could also try the built-in Image Processor script, which offers PSD and the ability to resize to fit 30,000 px on the width and height. No need for an action or batch!

 

EDIT: The resize isn't conditional, so perhaps best to do the resize manually. It would be simple enough to script this so that only images greater than 30K on either side are reized, leaving 30K or less as is.