• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Way to check if 1000s of.tifs are saved with transparency.

Community Expert ,
Jul 03, 2018 Jul 03, 2018

Copy link to clipboard

Copied

Is there a way  to check this setting was enabled on 1000s of files? Such as with bridge, up in the filename, or even down in bottom left of window.

Screen Shot 2018-07-03 at 4.25.57 PM.png

Opening up each file and doing a save as, is really time consuming.

Views

5.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 07, 2018 Jul 07, 2018

OK, here is a hack to another Adobe Bridge script to add TIFF files WITH transparency to a collection… Yes, I know you wish to locate files without transparency, but at least this is a start… Stay with me here :]

 

Once the collection is created, apply a unique metadata entry such as a label; star rating or keyword that is not used in your files to all of the transparent images in the collection.

 

Now when you view the images outside of the collection back in their original locations, the label

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 10, 2018 Jul 10, 2018

Copy link to clipboard

Copied

To me .psd is better than .tif for 3 reasons in ours and most all workflows, can you think of any more pros or cons?

If you haven't placed the TIFFs yet I can't think of a problem with converting them all to .psds. If there are any text or path layers, Photoshop PDFs might be better because TIFF and PSD vector objects get flattened to pixels when you export or print out of ID.

This would make PDF/X4 copies into the same directory:

var psdFolder = Folder.selectDialog("Select the folder containing Images", "");

var myFiles = psdFolder.getFiles(/\.(tif)$/i);

var so = new PDFSaveOptions();

so.PDFStandard = PDFStandard.PDFX42008;

for (var a = 0; a < myFiles.length; a++){

    var d = open(myFiles);

    d.saveAs(new File(d.path + "/"+ d.name.slice(0, -4) + ".pdf"), so);

    d.close();

};

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2018 Jul 11, 2018

Copy link to clipboard

Copied

Management is requiring us to use .tif. I tried to explain the benefits of .psd on multiple occasions, but they are not open to changing that. For me is crystal clear they are not working in the best way, as we have drop shadows and clear areas of packages that need blending modes applied in InDesign. Eventually in the future I see them realizing the error of their way, but at this point they are struggling with this new account, so best for me to support them with this .tif format, though to me is a foolish workflow.

There are no vector objects in the layers for all the files I have seen, but you make a great point. My concern is some other people might accidentally turn on lossy compression. To me .psd format is foolproof for placing into InDesign. But I like you suggestion and will look more into Photoshop .pdfs after I restart my computer which is acting bad at the moment.

The problems my computer are likely from tryin to install EXIF yesterday, so will reboot, catch up on my work, reply to Stephen post after i have had some time to attempt the suggestions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 10, 2018 Jul 10, 2018

Copy link to clipboard

Copied

From Photoshop you can run a script via File>Scripts>Browse..., there's no need to install the script.

Copy the code to a plain text editor doc and save with the .jsx extension, and choose it from Browse...

When you select the file you will immediately get another dialog asking for the folder with the TIFFs.

Unchecking the Ask When boxes in Color Settings should prevent profile warnings.

Also if you are on OSX the script is looking for the .tif extension, so if you are hiding extensions it might not work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2018 Jul 07, 2018

Copy link to clipboard

Copied

OK, here is a hack to another Adobe Bridge script to add TIFF files WITH transparency to a collection… Yes, I know you wish to locate files without transparency, but at least this is a start… Stay with me here :]

 

Once the collection is created, apply a unique metadata entry such as a label; star rating or keyword that is not used in your files to all of the transparent images in the collection.

 

Now when you view the images outside of the collection back in their original locations, the label or rating will be visible. You can now easily sort and isolate the files with and without the label or rating etc using the filter panel, find command, smart collections etc.

 

Job done!

 

// https://forums.adobe.com/thread/1990912
// https://forums.adobe.com/message/10481093
#target bridge    
   if( BridgeTalk.appName == "bridge" ) {    
tiffTransparency= MenuElement.create("command", "Add Transparent TIFFs to Collection", "at the end of Tools");  
}  
tiffTransparency.onSelect = function () {   
var fileList = Folder(app.document.presentationPath).getFiles("*.tif");  
withTransparency = new Array();  
for(var x in fileList){  
var file = fileList[x];  
file.open("r");  
file.encoding = 'BINARY';  
var dat = file.read();  
file.close();  
var result;  
var pos = [];  
var Text= [];  
var rex = /Transparency/g;  // What to look for: ExifTool Tag 0x03ee AlphaChannelsNames = .Transparency
while ((result = rex.exec(dat)) != null) {  
pos.push(result.index+(result[0].length));  
}  
if(pos.length>0) withTransparency.push(new Thumbnail(fileList[x]));  
dat=null;  
}  
if(withTransparency.length >0){  
var foundFiles = app.createCollection("Transparent TIFFs");  
app.addCollectionMember(foundFiles,withTransparency);  
    }  
};

 

Info on downloading/saving and installing scripts here:

 

Prepression: Downloading and Installing Adobe Scripts

 

P.S. If these methods are tool slow on 1000’s of images, then an ExifTool command could be run to dump the non-transparent files into a text file log, which should be pretty fast.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2018 Jul 07, 2018

Copy link to clipboard

Copied

Rather than testing for transparency, which might not tell you if the transparency save option was checked, I wonder if a brute force save all would be better. Unless the files are quite large a SaveAs on all of the files should be pretty quick. Something like this that would get and save all of the files with a .tif extension in the chosen folder:

var psdFolder = Folder.selectDialog("Select the folder containing TIFs", "");

var myFiles = psdFolder.getFiles(/\.(tif)$/i);

//enables transparency in the TIFF Save Options

var so = new TiffSaveOptions();

so.transparency = true;

for (var a = 0; a < myFiles.length; a++){

    var d = open(myFiles);

    d.saveAs(new File(d.fullName), so);

    d.close();

}; 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2018 Jul 07, 2018

Copy link to clipboard

Copied

Thanks for contributing Rob! Yes, the brute force resave approach is a workable fallback, one does not even need a script to do this to batches of images.

Rather than testing for transparency, which might not tell you if the transparency save option was checked

It does tell you if the TIFF transparency option was used when saving, which is the reason that I suggested it. :]

I performed many tests comparing layered files with/without the transparency checkbox used when saving vs. flat files etc. The transparency checkbox does not have to be used when saving a layered file. However if the transparency checkbox is used, then an entry is written to the file (this alpha channel transparency entry does not result in a physical alpha channel appearing in Photoshop when a file is opened though). This entry is not produced if layers are simply used, which is why the OP rejected my first solution as it was not targeted to the specific situation at hand.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 08, 2018 Jul 08, 2018

Copy link to clipboard

Copied

The transparency checkbox does not have to be used when saving a layered file.

Right, but it does have to be checked if you want the transparency to be honored when placing in InDesign. I'm assuming that's why it's a problem for Mike.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 08, 2018 Jul 08, 2018

Copy link to clipboard

Copied

Right, but it does have to be checked if you want the transparency to be honored when placing in InDesign. I'm assuming that's why it's a problem for Mike.

Could be Rob, so there are two main options:

1) Setup a batch action or use script to re-save every TIFF file with the transparency box checked.

2) Use a script or ExifTool to isolate the images, then only batch process the images that actually require re-saving.

Either method is workable.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

Hi, does anyone know if this Bridge script still works with Adobe Bridge 2023? I am on Mac OS Sonoma. 

"Add Transparent TIFFs to Collection" appears in the Tools menu and I am selecting a folder with tif files that were saved with transparency.

I also have other Bridge scripts that work fine but nothing is happening with this one. 

Any feedback is appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

@ront88495709 

 

I just tested in Bridge 2024 and the script no longer works. So somewhere between 2018 and now changes to Bridge have broken the script.

 

EDIT: Turns out one has to quit and restart Bridge 2024 in order to see the new collection as it isn't updating "live".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

 

Stephen - Ah interesting observation restarting Bridge to see the new collection. That is the same for me for a similar script that finds tif files with alpha channels. But not this script for identifying transparency. Again I am in 2023 Bridge. I will try 2024.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

Hi Stephen --- thanks for the quick response!
Seems odd to me that Adobe Bridge doesn’t indicate whether a tif file was saved with transparency or not – somewhere in the metadata fields. Even Mac Finder Info panel shows an Alpha Channel status as Yes or No.

I am looking use friendly way to QC tif files to ensure they are saved with transparency. I will look into ExifTool
--
RON TROYER

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

@ront88495709 

 

Update: Turns out one has to quit and restart Bridge 2024 in order to see the new collection as it isn't updating "live".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

I reported this bug in the 2023 pre-release program. Not fixed yet? I'm shocked. SHOCKED!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

LATEST

I'm coming into this way late, but you can check for channels in an image. Three channels means it definitely can't have transparency.

try{
var sels = app.document.selections;
if(ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
var descMeta = sels[0].synchronousMetadata.read("http://ns.adobe.com/tiff/1.0/", "BitsPerSample");
Window.alert(descMeta.length.toString());
}
catch(e){
Window.alert(e + e.line);
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines