I am trying to generate PDF/A-1 compliant documents, in which transparency is not allowed. I would like to check, if included PDF and PNG images have transparency.
Is there a TeX way to check this? Otherwise, what is the proper way to change the
\includegraphics command to call external tools to check this?
Edit: External tools for checking transparency:
identify does the job nicely. It displays
[s]rgba when there is an alpha channel (otherwise it's
# identify -format '%[channels]' Transparent.png srgba
# identify -format %A Transparent.png True
For PDFs, this is more complicated (see eg here): There are as graphical style attributes fill opacity (
/ca) or stroke opacities (
/CA) below a value of 1.0, or there is a soft mask (
\SMask), or there is a transparency page group defined (
grep -aE -e '/[Cc][Aa] +0?\.[0-9]' -e '/SMask' -e '/S /Transparency' *.pdf
I bet it is somehow possible to check with
gs, but I did not find it so far.