Identifying layered TIFs in InDesign

Anybody know where I am going wrong? I have tried different variations…


Stephen Marsh

The script was designed to run from a file on the contents of the directory that file is located in. ${BASH_SOURCE[0]} evaluates to the path of the script, then the script changes the working directory to be its location. When automator runs it, there isn't really a source file, so ${BASH_SOURCE[0]} evaluates to nothing and "cd " is probably what gets executed, which would leave the working directory the home directory of the user who executed it (e.g., /Users/YourName). If you had any TIFF files in your home directory, you might want to check your home directory for a "MULTIPLE LAYERS" directory.

You'll want to change "Pass input" from "to stdin" to "as arguments" (otherwise it would be next to impossible to correctly separate multiple files if any of their names contained spaces).

When you switch from running a script from a file on all of its sibling TIFF files to all of the files selected in Finder, a few complications are introduced. The files selected when the script is invoked are not necessarily in the same directory, so they could potentially have identical names, which wouldn't work if they needed to be moved to the same directory. You might also not know where the files originally came from if files from multiple directories were moved into the same directory.

I've attached a not-heavily-tested version that will probably work (the forum apparently kills the whitespace formatting if I just paste it here). To avoid the multiple source directory problem, it should figure out the deepest directory containing all selected files, put the "MULTIPLE LAYERS" directory there, then recreate the subdirectories from that point within the "MULTIPLE LAYERS" directory.

Since there's no terminal window to report that it's finished in, it creates a notification (Mountain Lion or newer required). Enabling permissions for osascript can be a pain in newer versions of OS X - you may just want to remove the last line if you don't expect to run this on hundreds of files at a time.
 

Attachments

  • bashscript.txt
    988 bytes · Views: 273
Thanks Kyle, that works in 10.9.5, Gregg may not have cared, however I thought that it would be much more accessible to use via a contextual click/keyboard shortcut, rather than having to find the shell script file, place it in a folder full of images etc.


Stephen Marsh
 
Cool you guys got this figured out. BTW why oh why were layered TIF files invented?

Remember, that outside of Photoshop, other apps don’t see the layers and the file is therefore considered flattened for most intents and purposes.

There are pros/cons for using layered TIFF or (layered) PSD files. There is no single correct answer, it depends on your workflow and preference.

Read the comments here:

https://indesignsecrets.com/why-psds-are-better-than-layered-tiffs.php


Stephen Marsh
 
BTW why oh why were layered TIF files invented?

I only use them for greyscale images. You can't colour a greyscale PSD with a spot colour in InDesign, but you can a TIFF. Most of my greyscale images still have the the RGB version present, contained in a smart object along with some adjustment layers, with a Smart Sharpen applied. It makes for bigger files but makes them easier to repurpose.
 
One of the Links palette options it to show layer overrides, but this only works with PSDs. Some one should suggest to Adobe to make it work with TIFFs.
 
One of the Links palette options it to show layer overrides, but this only works with PSDs. Some one should suggest to Adobe to make it work with TIFFs.

Outside of Photoshop the TIFF *is* flat, so no layer overrides – so I am not sure what would be needed to make InDesign behave like Photoshop in this regard and what benefit it would provide vs. the work taken to make it so.


Stephen Marsh
 
why oh why were layered TIF files invented?

One argument for layered tiffs is that they save faster and can compress more. If you have a multi-core machine (who doesn't?), Photoshop can only use a single core for the RLE compression it uses when saving PSDs. Saving tiffs can multithread and use all cores. This can make a significant difference in save time.

That being said, I would never used a layered tiff for final output. Our workflow dictates that all files have 2 versions: a layered "working" file (with adjustment layers, silos, etc) and a flattened tiff for output. It saves us time and space to save our working files as layered tiffs.
 
One argument for layered tiffs is that they save faster and can compress more. If you have a multi-core machine (who doesn't?), Photoshop can only use a single core for the RLE compression it uses when saving PSDs. Saving tiffs can multithread and use all cores. This can make a significant difference in save time.

That being said, I would never used a layered tiff for final output. Our workflow dictates that all files have 2 versions: a layered "working" file (with adjustment layers, silos, etc) and a flattened tiff for output. It saves us time and space to save our working files as layered tiffs.


I wondered why they invented such a PITA file format.
 
I wondered why they invented such a PITA file format.


TIFF is an old but very versatile image format that has been extended over the years to add flexibility for different workflows and imaging requirements.

As the link in post #23 shows, there are pros/cons to both PSD and TIFF and what is good for one user/workflow may not be for another.

https://en.wikipedia.org/wiki/Tagged_Image_File_Format

IMHO it would be more of a PITA to live without TIFF than with it, although PDF is fast becoming an alternative in may quarters with various ISO groups extending it’s features for various markets.


Stephen Marsh
 
I understand TIFF I just don't understand layered TIFF files. WTH, TIFF files were great layered TIFF files have been a PITA.
 
I understand TIFF I just don't understand layered TIFF files. WTH, TIFF files were great layered TIFF files have been a PITA.

What is the PITA David, I don’t understand your exact problem? Outside of Photoshop, all other apps that I know of see them as flat.

I would imagine that adding ZIP compression has been more problematic than layers.


Stephen Marsh
 
Then why does the guy in this post have to find them? Our 3 RIPS fail with them, flat tiff only please. CorelDraw sees them as does Corel Photo-PAINT, they're just smart enough not to save in the layered tiff format.
 
Then why does the guy in this post have to find them?

I asked about your problems with layered TIFF’s David, not the OP. By reading and comprehending the OP and subsequent posts, I know why these need to be identified.


Our 3 RIPS fail with them, flat tiff only please. CorelDraw sees them as does Corel Photo-PAINT, they're just smart enough not to save in the layered tiff format.

Thank you – now I know why you consider layered TIFFs to be a PITA! :]

Of course, not all inkjet RIP’s have this limitation.

I would expect Photo-PAINT to see layered TIFF if they were competing with Adobe Photoshop.

I did not know that CorelDRAW could see the layered TIFF files too. Can one turn layers on and off inside DRAW? Does DRAW crash or something, is this a problem?


Stephen Marsh
 
Last edited:
Draw not being an image editor cannot edit them, it can flatten them directly within Draw. there is a direct interface though with Photo-PAINT, the only problem is that now you have an image in your file that is not universally compatible. Layrd TIFF is a bad idea. No crashing in Draw just a formula for bad output.

Photo-PAINT is not a direct competitor for Photoshop, it is a postscript compliant, LAB & N color image utility to support Draw. Painter and Paintshop Pro are Corels image editing applications. I have PS, PP, PSP and Painter, after the last couple years I only use PS when forced to.
 
Just discovered that Flightcheck has the ability to flag layered files. It will flag all of the layered files, including PSDs. So while it doesn't hold a flame to Kyle's script, it is an option.
 
And then there is the venerable ExifTool:
exiftool -u '-layer*' '/Mac/path/to/file/'

exiftool -u "-layer*" "C:\Win\path\to\file"


Stephen Marsh
 
Last edited:
The previous ExifTool commands simply list the properties of layered PSD or TIFF.

To move layered TIFF files using ExifTool, one can use the following:
[FONT=courier new, courier, monospace]exiftool -if [/FONT]'[FONT=courier new, courier, monospace]$ImageSourceData[/FONT]'[FONT=courier new, courier, monospace] -directory=[/FONT]'[FONT=courier new, courier, monospace]/Path/to/Create/New/Mac OS/Folder/MULTIPLE LAYERS[/FONT]'[FONT=courier new, courier, monospace] '/Path/to/original/folder' -r[/FONT]​


(remove the -r command at the end if you don’t wish to recursively scan sub-directories, swap the Mac single foot mark for Windows inch marks, straight not curly/typographer quotes )



Stephen Marsh
 
Last edited:

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top