Wednesday 7 October 2015

Batch Convert PSD files to PNG Using Photoshop

Follow the steps to batch convert Photoshop Files (PSD) into PNG files.

1. Copy the script below into a file named convert2png.jsx
2. Open Photoshop then run convert2png.jsx by clicking menu
File => Scripts => Click Browse => Select the file
3. Select the files you want to convert and click open.
4. PNG files with the same name will be created and placed in the same directory as the source files.

var files = openDialog();
for(var key in files) {
    var inFile = files[key];
    open(inFile);

    var pngOptions = new PNGSaveOptions();
    pngOptions.interlaced = false;
    app.activeDocument.saveAs(inFile, pngOptions, true, Extension.LOWERCASE);
    app.activeDocument.close();
 }


/Adnan

About the Author

Adnan Zameer, Lead Developer at Optimizley UK, is a certified Microsoft professional, specializing in web app architecture. His expertise includes Optimizley CMS and Azure, showcasing proficiency in crafting robust and efficient solutions.

2 comments :

  1. When someone requires an electronic document conversion, then obviously who would not want the best service to do the job? Well converting a design PSD to HTML is no exception. You would expect only quality work from such a service. psd to drupal

    ReplyDelete
  2. This is so beautiful and creative. I just love the colors and whoever gets it in the mail will be smiling. front end developers

    ReplyDelete