Skip to main content
Inspiring
May 19, 2015
Question

tif2jpeg conversion. How to find tif or photoshop eps files which have layers or transparencies???

  • May 19, 2015
  • 2 replies
  • 645 views

hello

We have problem with growing used space on server and workstations and want in future use only jpg instead tif, where is possible.

I have 10000000000000000000000 tif and photoshop eps files on server which I need to convert to jpg. But only this which dont have layers or transparencies which jpg wont support.

How to find this images in folder and move it to some new folder? If bridge cant to this maybe some recommendation for other software.

Many thanks

This topic has been closed for replies.

2 replies

Inspiring
May 20, 2015

You could ask at the ImageMagick forum to see if they could help.

ImageMagick - Index page

kajzicaAuthor
Inspiring
May 24, 2015

After many many copy/paste trial/error I have finished script. CS6 on Windows. Someone can clean code. Error log go to Windows/temp for easy clean.

Script convert layered images to pdf format which I think is better than psd and into source subfolder PDFs. PDF parameters is in the script.

Script convert non-layered images to jpg format and into source subfolder JPGs. JPG parameters is in the script.

1. Copy script "Layered PSD-TIF to layered PDF_Non-layered to JPG.jsx" to C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts

2. Copy droplet "Layered PSD-TIF to layered PDF_Non-layered to JPG.exe" somewhere on pc.

3. Load actions set1 into action panel

4. Drop images onto droplet and wait.

download

http://1drv.ms/1LyMlGF

// 2015, use it at your own risk;

#target photoshop

if (app.documents.length > 0) {

var myDoc = app.activeDocument;

if (myDoc.layers.length == 1 && myDoc.layers[0].isBackgroundLayer == true) {

// Defines the active document that is opened

var docRef = app.activeDocument;

var imgName= docRef.name;

imgName = imgName.substr(0, imgName.length -4);

// Get name of Folder Path

var docFolder = docRef.fullName.parent;

var folderPath = docFolder.fsName;

// Create a sub-folder called PDFs in the working folder

var newPathFolder = new Folder( folderPath + "//JPGs/");

newPathFolder.create();

// Save Options for JPGs

var saveFile = new File( folderPath + "//JPGs/" + imgName + ".jpg");

SaveJPEG(saveFile, 10);

function SaveJPEG(saveFile, jpegQuality){

jpgSaveOptions = new JPEGSaveOptions();

jpgSaveOptions.embedColorProfile = false;

jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;

jpgSaveOptions.matte = MatteType.NONE;

jpgSaveOptions.quality = jpegQuality; // 10

activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

}

} else {

// Defines the active document that is opened

var docRef = app.activeDocument;

var imgName= docRef.name;

imgName = imgName.substr(0, imgName.length -4);

// Get name of Folder Path

var docFolder = docRef.fullName.parent;

var folderPath = docFolder.fsName;

// Create a sub-folder called PDFs in the working folder

var newPathFolder = new Folder( folderPath + "//PDFs/");

newPathFolder.create();

// Save Options for PDFs

pdfFile = new File( folderPath + "//PDFs/" + imgName + "_photoshop.pdf")

pdfSaveOptions = new PDFSaveOptions()

pdfSaveOptions.layers = true;

pdfSaveOptions.embedColorProfile = false;

pdfSaveOptions.PDFStandard = PDFStandard.NONE;

pdfSaveOptions.PDFCompatibility = PDFCompatibility.PDF17;

pdfSaveOptions.preserveEditing=true;

pdfSaveOptions.embedThumbnail=true;

pdfSaveOptions.optimizeForWeb = true;

pdfSaveOptions.downSample = PDFResample.NONE;

pdfSaveOptions.encoding = PDFEncoding.PDFZIP;

pdfSaveOptions.colorConversion = false;

pdfSaveOptions.profileInclusionPolicy = false;

pdfSaveOptions.alphaChannels = true;

// set to NONE to allow PDF Security Options. Permission is for Printing only. A common password

// needs to be added as soon as the file is saved without typing it in all the time

docRef.saveAs(pdfFile, pdfSaveOptions, true, Extension.LOWERCASE);

docRef.close(SaveOptions.DONOTSAVECHANGES);

}

};

kajzicaAuthor
Inspiring
May 25, 2015

now better version which recognize channels/paths and bitmap mode which cant be saved as jpg...

// 2015, use it at your own risk; 

#target photoshop 

if (app.documents.length > 0) {

    var myDoc = app.activeDocument; 

}

//DEFINIRANJE MODA

var modSlike = app.activeDocument.mode;

if(modSlike == DocumentMode.CMYK){modSlike = "CMYK";}

if(modSlike == DocumentMode.RGB){modSlike = "RGB";}

if(modSlike == DocumentMode.GRAYSCALE){modSlike = "GRAYSCALE";}

if(modSlike == DocumentMode.BITMAP){modSlike = "BITMAP";}

var dodatnihKanala = 0;

if(modSlike == "CMYK"){dodatnihKanala = myDoc.channels.length - 4;}

if(modSlike == "RGB"){dodatnihKanala = myDoc.channels.length - 3;}

if(modSlike == "GRAYSCALE"){dodatnihKanala = myDoc.channels.length - 1;}

if(modSlike == "BITMAP"){dodatnihKanala = myDoc.channels.length - 1;}

if(modSlike == "BITMAP"){

    // Defines the active document that is opened

    var docRef = app.activeDocument;

    var imgName= docRef.name;

    imgName = imgName.substr(0, imgName.length -4);

    

    // Get name of Folder Path

    var docFolder = docRef.fullName.parent;

    var folderPath = docFolder.fsName;

    

    // Create a sub-folder called TIFBitmaps in the working folder

    var newPathFolder = new Folder( folderPath + "//TIFBitmaps/");

    newPathFolder.create();

    

    // Save Options for TIFBitmaps 

    var saveFile = new File( folderPath + "//TIFBitmaps/" + imgName + ".tif"); 

    SaveTIFF(saveFile); 

    function SaveTIFF(saveFile){ 

    tiffSaveOptions = new TiffSaveOptions();  

    tiffSaveOptions.embedColorProfile = false;  

    tiffSaveOptions.alphaChannels = true;  

    tiffSaveOptions.byteOrder = ByteOrder.IBM;  

    tiffSaveOptions.layers = true; 

    tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW; 

    tiffSaveOptions.layerCompression = LayerCompression.ZIP; 

    tiffSaveOptions.spotColors = true; 

    tiffSaveOptions.transparency = true; 

    activeDocument.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);  

    }   

}else if (myDoc.layers.length == 1 && myDoc.layers[0].isBackgroundLayer == true && dodatnihKanala == 0) { 

    // Defines the active document that is opened

    var docRef = app.activeDocument;

    var imgName= docRef.name;

    imgName = imgName.substr(0, imgName.length -4);

    

    // Get name of Folder Path

    var docFolder = docRef.fullName.parent;

    var folderPath = docFolder.fsName;

    

    // Create a sub-folder called PDFs in the working folder

    var newPathFolder = new Folder( folderPath + "//JPGs/");

    newPathFolder.create();

    

    // Save Options for JPGs 

    var saveFile = new File( folderPath + "//JPGs/" + imgName + ".jpg"); 

    SaveJPEG(saveFile, 10); 

    function SaveJPEG(saveFile, jpegQuality){ 

        jpgSaveOptions = new JPEGSaveOptions(); 

        jpgSaveOptions.embedColorProfile = false; 

        jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; 

        jpgSaveOptions.matte = MatteType.NONE; 

        jpgSaveOptions.quality = jpegQuality; // 10

        activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

    }

} else { 

    // Defines the active document that is opened

    var docRef = app.activeDocument;

    var imgName= docRef.name;

    imgName = imgName.substr(0, imgName.length -4);

    

    // Get name of Folder Path

    var docFolder = docRef.fullName.parent;

    var folderPath = docFolder.fsName;

    

    // Create a sub-folder called PDFs in the working folder

    var newPathFolder = new Folder( folderPath + "//PDFs/");

    newPathFolder.create();

    

    // Save Options for PDFs

    pdfFile = new File( folderPath + "//PDFs/" + imgName + "_photoshop.pdf")

    pdfSaveOptions = new PDFSaveOptions()

    pdfSaveOptions.layers = true;

    pdfSaveOptions.embedColorProfile = false;

    pdfSaveOptions.PDFStandard = PDFStandard.NONE;

    pdfSaveOptions.PDFCompatibility = PDFCompatibility.PDF17;

    pdfSaveOptions.preserveEditing=true;

    pdfSaveOptions.embedThumbnail=true;

    pdfSaveOptions.optimizeForWeb = true;

    pdfSaveOptions.downSample = PDFResample.NONE;

    pdfSaveOptions.encoding = PDFEncoding.PDFZIP;

    pdfSaveOptions.colorConversion = false;

    pdfSaveOptions.profileInclusionPolicy = false;

    pdfSaveOptions.alphaChannels = true;

    

    // set to NONE to allow PDF Security Options. Permission is for Printing only. A common password

    // needs to be added as soon as the file is saved without typing it in all the time

    docRef.saveAs(pdfFile, pdfSaveOptions, true, Extension.LOWERCASE);

    docRef.close(SaveOptions.DONOTSAVECHANGES);

}

Benjamin Root
Legend
May 20, 2015

I'm not aware of any way to do this with Bridge, or other software which can, unfortunately. You can search for tif, but not for if they are layered.

Benjamin