The journal I'm going to submit a paper requires .tiff format for images. I'm trying to add .tiff in latex, and I've found a thread: Add tif image to LaTeX.
However, I cannot add image from .tiff, and I don't know how to resolve it.
I just added
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.tif}{png}{.png}{convert #1 \OutputFile}
\epstopdfDeclareGraphicsRule{.tiff}{png}{.png}{convert #1 \OutputFile}
\AppendGraphicsExtensions{.tif,.tiff}
but I got a message
'convert' is not recognized as an internal or external command, operable program or batch file.
and error
'filename-tiff-to-png' not found
The epstopdf works well for .eps file, and my guess is that I miss something about the convert in the line \epstopdfDeclareGraphicsRule{.tif}{png}{.png}{convert #1 \OutputFile}.
Any help would be appreciated.
convertcommand) installed? – frabjous Mar 08 '22 at 02:44converttoconvert -layers flattenin case the.tiff/.tiffile has multiple layers. – frabjous Mar 08 '22 at 02:56convert, but it is still not recognized. Is there anything I should do after installing ImageMagick? Thanks – Young Mar 08 '22 at 15:29.tifto.png. Is there another way easily do that? – Young Mar 08 '22 at 15:32convertto do the conversion on the fly. With-layers flattenadded after convert, your code above works for me (when pdflatex is called with--shell-escapeanyway) Can you useconvertfrom the command line? My guess is that LaTeX can't findconvertbecause it's not in your PATH.. But I'm on Linux, andconvertis automatically added to my PATH when I install it. Especially if you're on Windows, you may need to do some work to add the folder with the convert executable to your PATH. Post the log file if you can. – frabjous Mar 08 '22 at 16:15--shell-escapeand-layers flattenbut it still there. Also, I've tried to add path of ImageMagick to Windows Environment Variable Path, but it seems not working. You must be able to see the log file here: link – Young Mar 08 '22 at 18:06convertfrom the command line, and it actually converts the image file. One thing I'm confused is that I got an error message thatconvertnot found only when I added--shell-escapeflag. Without the flag, I don't get the message but it still not converted. My understanding was that it should be opposite, right? – Young Mar 09 '22 at 04:29--shell-escapeisn't there. Have you tried putting the full pathC:\path\to\whatever\convert.exein place ofconvertin the code? (You may need to escape the backslashes.) If you're not changing the.tiffa lot, I would just use the.pngyou already got by converting, and save the.tiffas well to send to the journal. – frabjous Mar 09 '22 at 04:44convertfor some reason. I really appreciate all of your help! – Young Mar 09 '22 at 05:17