MicrostockGroup

Illustrators Corner - Microstock Illustrators Forum => Illustration - General => Topic started by: rapunzels on August 10, 2011, 06:56

Title: EPS to PNG bulk file conversion
Post by: rapunzels on August 10, 2011, 06:56
Can anyone advise about EPS to PNG bulk file conversion using PhotoShop
Title: Re: EPS to PNG bulk file conversion
Post by: click_click on August 10, 2011, 09:36
Have you tried the batch tool in PS?

Without researching, I'm under the impression that opening an EPS in Photoshop inevitably leads to PS asking you for the resolution to open the EPS.

I'm not aware that this can be cheated (in the batch tool).

Off the bat I would say you can't do that with PS.

Curious to see a solution for that though.
Title: Re: EPS to PNG bulk file conversion
Post by: cthoman on August 10, 2011, 09:56
I don't know if you can do something that's totally automatic in Photoshop. You should be able to speed up the process using the Actions palette. I have one set up that saves the file, then closes it for when I create jpegs for my stock files. Like was mentioned above, I still have to set the resolution when I open the file.
Title: Re: EPS to PNG bulk file conversion
Post by: AridOcean on August 10, 2011, 10:07
If you open the eps file with a script you can specify the desired size in the EPSOpenOptions.
Title: Re: EPS to PNG bulk file conversion
Post by: Morphart on August 22, 2011, 20:03
I recently got help to design a Script to open small EPS (2 x 3 or 3 x 4 inches EPS) into photoshop at high res and save as JPG. You can use this to open the files in batch. Then you simply create an action that Saves as PNG and close the file (didnt put that in the script).

If you want to open the file as the same dimension of the EPS, remove:
epsOpts.width = new UnitValue( 603000, '%' );
epsOpts.height = new UnitValue( 603000, '%' );

If you want to open a specific width or height, change % to px and insert the value.

If you want to open a relative size, change 603000% to something more reasonable for your needs (test with 1 file in a folder and change the value until you get what you need).

The script will open all EPS found in a folder.

Code: [Select]
var epsOpts = new EPSOpenOptions();
epsOpts.antiAlias = true;
epsOpts.mode = OpenDocumentMode.RGB;
epsOpts.resolution = 72;
epsOpts.constrainProportions = true;
epsOpts.width = new UnitValue( 603000, '%' );
epsOpts.height = new UnitValue( 603000, '%' );
#target Photoshop
 
app.bringToFront;
 
var inFolder = Folder.selectDialog("Please select folder to process");
if(inFolder != null){
var fileList = inFolder.getFiles(/\.(eps)$/i);
var outfolder = new Folder(decodeURI(inFolder) + "/Processed");
if (outfolder.exists == false) outfolder.create();
for(var a = 0 ;a < fileList.length; a++){
if(fileList[a] instanceof File){
var doc= open(fileList[a],epsOpts);

}
}
};