I am writing a thesis on XeLaTeX and I will be using a lot of .tif files. I always get errors because apparently it is not supported. I tried changing the files name to .png, it allows me to see the image on Preview but it still doesn't show on the recompiled pdf. Since I will be using a lot of .tif pictures, it is really hard for me to change all of them manually to png, or any other format. I wanted to ask if there is a command/package that I can use to continue working with my .tif images? I dont mind converting them to jpg, png or pdf. I checked similar questions but when testing the answers I even got more errors. I appreciate any help! Thank you.
Asked
Active
Viewed 880 times
1 Answers
1
If you convert all your images to jpg then they can be more easily included, I would suggest doing this locally before uploading to your Overleaf project.
On a mac
https://stackoverflow.com/questions/7179979/via-command-line-convert-tif-and-pdf-to-jpg-or-png
Suggests a way of batch converting a collection of tif files.
On linux (or windows with a suitable shell) if you have image magic convert a simple loop such as
for i in *.tif; do convert $i ${i/.tif/.jpg} ; done
would convert all the files in the current directory.
David Carlisle
- 757,742
-
1Be careful. TIFF may be lossless; JPEG is lossy (there is a lossless JPEG, not widely supported). – Javier Bezos Feb 03 '21 at 18:12
-
@JavierBezos yes png may be a better option if that is a concern – David Carlisle Feb 03 '21 at 18:59
-
for i in *.tif; do convert $i ${i/.tif/.png} ; donewould convert them all for example. – David Carlisle Feb 03 '21 at 15:41also the images are created with SEM-Microscope, I dont think .png is supported on SEM's software.
– user231849 Feb 03 '21 at 15:52Makefiles. – Oleg Lobachev Jun 28 '22 at 21:09