Copy link to clipboard
Copied
Hi everyone,
I created a barcode in RGB with a library in Objective-C. Then I convert it to CMYK colorspace using ImageMagick.
The converted graphic shows transparency when putting it in Photoshop, but not in InDesign..
It has the alpha channel. If I open it in Photoshop, save it FROM photoshop to TIFF and import in InDesign, then the transparency appears.
You can use Color Settings>Working CMYK>Custom CMYK to set the Max Black Generation and then use Save CMYK to save the .icc profile to one of your profile folders.
This really is doing it the hard way
Copy link to clipboard
Copied
Did you select the save transparency option when saving the TIFF?
Copy link to clipboard
Copied
My TIFF file is created from a library in Objective-C so there is not really a save transparency option, but when I preview the created barcode in Mac Preview or open it in Photoshop or Sketch, I can see the transparency. It just does not show up in InDesign when importing it.
Copy link to clipboard
Copied
You'll have to Save As as from Photoshop. The PSD format has the advantage of Object Layer Options in InDesign.
Copy link to clipboard
Copied
Yes, but ideally I would like to not have to open it in photoshop and save again.. as I have hundreds of graphics to process..
My question is more like why opening the original .tiff file in photoshop shows transparency while it does not in InDesign
Copy link to clipboard
Copied
You can batch process hundreds of files in Photoshop without opening the file.
What kind of barcode are you creating? i.e. Code 39, UPC, QR, etc. There may be a better way to create the barcode.
Copy link to clipboard
Copied
I'm creating Data Matrix barcodes.
Do you think it would be possible to batch process the Photoshop file from my code written in Objective-C/Swift?
Copy link to clipboard
Copied
What is the format from Object-C? If it is a format Photoshop can open, then an action and batch process could be used for the things mentioned: convert RGB to grayscale, flatten image, save to specific format, etc.
Copy link to clipboard
Copied
It can be: TIFF, JPEG, PNG, GIF..
It's just that I'm trying to do everything in one go, the user input the barcode and it gives you a CMYK Data Matrix barcode.
I have all this so far, just the transparency that is gone when importing to InDesign.
Copy link to clipboard
Copied
For this to happen in one go, create an action and droplet in Photoshop:
1. The action can be accomplished by opening an image, using the action record button and perform all necessary transformations, click stop and save.
2. Then use Create Droplet, this will associate a folder to the action, and then files can be saved directly from Object-C to the droplet folder, perform conversions, and be ready to place into ID.
Copy link to clipboard
Copied
Photoshop, as a dedicated graphic image file processor, supports more file types, and more variants of each file type, than InDesign does. If InDesign does not support alpha transparency in CMYK TIFF files natively (*), then you must indeed open then and re-save with other software into a format that ID does support.
An alternative to open and close everything with Photoshop (you know PS can make it a batch process so it can run overnight?) is to use a command line utility such as ImageMagick, or, as you are in control of the source software, have that output something more compatible so you don't need to convert anything later on.
(*) I searched around a bit for confirmation but was unable to verify this with a casual google, but I think InDesign never has supported CMYK + alpha transparency for TIFF images.
Copy link to clipboard
Copied
But InDesign does support CMYK with TIFF if you save it from Photoshop just not directly from the conversion done by ImageMagick it looks like?
I can switch to another format if needed, I only need the CMYK ColorSpace for printing AND transparency.
"as ImageMagick, or, as you are in control of the source software, have that output something more compatible so you don't need to convert anything later on."
--> Does that mean there is an option I could use to have the transparency correctly in ID?
Here is the command I use with ImageMagick:
convert /path/to/RGB_GRAPHIC.tiff -profile /path/to/cmyk_profile.icc /path/to/CMYK_GRAPHIC.tiff
Copy link to clipboard
Copied
Here is the command I use with ImageMagick:
convert /path/to/RGB_GRAPHIC.tiff -profile /path/to/cmyk_profile.icc /path/to/CMYK_GRAPHIC.tiff
That would have to create a 4-color black—open one of the barcodes in Photoshop and check the values.
Why not grayscale set to Multiply? You don't need a transparent background.
Copy link to clipboard
Copied
I do need a transparent background, I have barcodes that are black on transparent or white on transparent, taking the color of the background.
EDIT:
What do you mean by check the values in Photoshop?
Copy link to clipboard
Copied
I have barcodes that are black on transparent or white on transparent, taking the color of the background.
I think I understand what you are trying to do, but it can be done via InDesign's Blend Modes or by simply assigning the [None] swatch to a 1-bit image's container frame.
These barcodes are grayscale tiffs with no transparency
These are 1-bit tiffs where I've set the barcode's container color to [None]. This page has no transparency:
Copy link to clipboard
Copied
What do you mean by check the values in Photoshop?
Normally if you make a conversion from RGB to CMYK your barcode wouldn't be black only, which would be a problem on an offset press. Open one of your barcodes and set Photoshop's Info to Actual color.
This is a default conversion from RGB to CMYK in Photoshop. If you need the barcode to be on the black plate grayscale or 1-bit would be better:
Copy link to clipboard
Copied
Here is what I have when opening the converted barcode from ImageMagick in Photoshop:
Copy link to clipboard
Copied
Hi,
how did you open this in PhotoShop?
You could open it in Grayscale mode if you like.
You could even do a color conversion to CMYK where R=G=B values are converted to 100% Black. Provided you are using the right ICC color profile. See into two profiles here:
ISOcoated_v2_grey1c_bas.ICC
Grayscale with maximum Black = 100%:
ISOcoated_v2_sw_bas.ICC
CMYK profile where R=G=B will convert to Black. Maximum Black = 100%:
Regards,
Uwe
Copy link to clipboard
Copied
I just drag and drop the file to Photoshop.
I converted to CMYK using: USWebCoatedSWOP.icc
Copy link to clipboard
Copied
alexandrel16871950 wrote
Here is what I have when opening the converted barcode from ImageMagick in Photoshop:
Right converting to CMYK is going to be a problem. Even if you used a max black profile as Uwe suggests, there’s no reason to do it. InDesign puts grayscales on the black plate.
Copy link to clipboard
Copied
Hmmm interesting!
It seems that I just found a way to do it programmatically! Instead of using ImageMagick to convert from RGB to CMYK. I used "sips" which is a built-in macOS tool, and with this, the graphic opens directly with transparency in InDesign!
sips - scriptable image processing system.
This tool is used to query or modify raster image files and ColorSync ICC profiles.
Its functionality can also be used through the "Image Events" AppleScript suite.
Try 'sips --help' or 'sips --helpProperties' for help using this tool
Copy link to clipboard
Copied
Instead of using ImageMagick to convert from RGB to CMYK. I used "sips" which is a built-in macOS tool, and with this, the graphic opens directly with transparency in InDesign!
You would still have the 4-color CMYK problem with a conversion to SWOP.
Copy link to clipboard
Copied
I am not sure I follow what's the issue? I just needed a CMYK barcode with transparency in InDeisng and that's what I got? Or InDesign is doing something under the hood? It's for a printer so unless he tells me there's an issue?
It's only black and white colors.
Copy link to clipboard
Copied
I am not sure I follow what's the issue?...
It's only black and white colors.
But it's not—with typical CMYK color profiles the conversion from 0|0|0 black to CMYK will be a 4-color mix and not the black only 0|0|0|100 you need. With SWOP it would be something like 75|68|67|90.
If the output is to a composite printer there wouldn't be a problem, but then you may as well place RGB.
If the output is to an offset press you will likely have a registration problem:
Copy link to clipboard
Copied
You can also check the barcode's output values in InDesign via Separation Preview. Here's an RGB barcode converted to SWOP.
Is there a technical reason for the CMYK mode?