3 Replies Latest reply on Nov 20, 2012 10:47 AM by Paul Riggott

    How To Convert PNG to PSD Batch And Script Photoshop Plugin


      Oh wouldnt it be nice!!!

      I am switching from Fireworks to Photoshop since purchasing and NOW I Have no way to import PNG files created in FIreworks with layers into photoshop.,

      I have searched HI and LOW!! oh can someone please help. I not longer have fireworks installed. I can install a trial but then i dont know how to convert about 1000 png to psd


      thank you everyone!!



        • 1. Re: How To Convert PNG to PSD Batch And Script Photoshop Plugin
          Paul Riggott Level 6

          This documentation might help...



          Also the people at http://forums.adobe.com/community/fireworks/fireworks_general might have a better idea as it looks as if the conversion needs to be done with Fireworks.

          • 2. Re: How To Convert PNG to PSD Batch And Script Photoshop Plugin

            You said this code was how to make an increasing number then save the file then increase the number then save the file etc. but how can you change it for PNG-24 instead of tiff. I want to do this for a bunch of YouTube thumbnails but I am having to do it manually and it is frustrating as I need about 300. Please email finished code to mrdons2004@live.co.uk




            #target photoshop var inputFolder = Folder.selectDialog("Select a folder of documents to process"); if(inputFolder) main(); function main(){ Count = 0; //This is where the output folder is created in this case its called PageNumbered var PathFolder = new Folder(decodeURI(inputFolder)+"/PageNumbered"); if (PathFolder.exists == false) PathFolder.create(); var fileList = inputFolder.getFiles(); for (var i = 0; i < fileList.length; i++) {         var file = fileList[i];   ////////////////////////////////////////////////////////////////////////////////////// //Change the line below to the extention of your input files ie: //if the imput files are tif the line should be // if (file instanceof File && file.name.match(/\.tif$/i)) {   if (file instanceof File && file.name.match(/\.jpg$/i)) {         open(file);     doc = app.activeDocument; var startRulerUnits = preferences.rulerUnits app.preferences.rulerUnits = Units.PIXELS //Amend to suit. var fontSize = 40; var fontName = "Helvetica"; // NB: must be postscript name of font! // This is the colour of the text in RGB //Click foreground colour in Photoshop, choose your colour and read off the RGB values //these can then be entered below. var textColor = new SolidColor();         textColor.rgb.red  = 0;         textColor.rgb.green =0;         textColor.rgb.blue = 0;   var newTextLayer = doc.artLayers.add(); newTextLayer.kind = LayerKind.TEXT; newTextLayer.textItem.size = fontSize; newTextLayer.textItem.font = fontName; newTextLayer.textItem.contents = ++Count; newTextLayer.textItem.color = textColor; newTextLayer.textItem.kind = TextType.PARAGRAPHTEXT; newTextLayer.textItem.height = fontSize; newTextLayer.textItem.width = doc.width -20; //The line below is the text position (X Y)  IE; 10 Pixels Right 10 Pixels Down newTextLayer.textItem.position = Array(10, 10); //  Can be RIGHTJUSTFIED LEFTJUSTIFIED CENTERJUSTIFIED newTextLayer.textItem.justification=Justification.LEFTJUSTIFIED; doc.flatten(); var saveFile = new File(decodeURI(PathFolder) + "/" +activeDocument.name.slice(0,-4)+".tiff"); SaveTIFF(saveFile); activeDocument.close(SaveOptions.DONOTSAVECHANGES); preferences.rulerUnits = startRulerUnits;   } } }  function SaveTIFF(saveFile){ tiffSaveOptions = new TiffSaveOptions(); tiffSaveOptions.embedColorProfile = true; tiffSaveOptions.alphaChannels = true; tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW; doc.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE); }

            • 3. Re: How To Convert PNG to PSD Batch And Script Photoshop Plugin
              Paul Riggott Level 6

              I have had a quick look at the documentation and managed to get a Fireworks script (jsf) to convert all selected pngs to pdf ....



              var fileList = App.chooseScriptTargetDialog(App.getPref("MultiFileBatchTypes"));
              for(a = 0;a< fileList.length;a++){
              var psdFile = fileList[a].toString().replace(/png$/i,'psd');
              var dom = fw.getDocumentDOM();


              Hope this helps.