Somehow Photoshop seems to save JPGs that causes XeLaTeX some issues. Images that are saved by my colleague from Photoshop cause the error:
! Dimension too large. <to be read again>
If I run imagemagik convert over the image (retaining the dimensions) then XeLaTeX will compile OK.
pdflatex seems to be able to compile without error
\documentclass[10pt]{report}
\usepackage{graphicx}
\begin{document}
\includegraphics{peruvian.jpg}
\includegraphics{peruvian-converted.jpg}
% converted with: convert peruvian.jpg peruvian-converted.jpg
\end{document}
files have the same dimensions:
$ file peruvian.jpg peruvian-converted.jpg
peruvian.jpg: JPEG image data, baseline, precision 8, 1196x500, frames 3
peruvian-converted.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 1196x500, frames 3
the image can be downloaded here. I gzipped it to avoid Dropbox messing with the image.
I'm running xelatex on Debian Stretch, texlive-xetex version: 2016.20170123-5
I know I could run convert over each image before I use it but I'd rather know why this happens and find a way to not have to convert images before I use them.
peruvian.jpg, I obtain similar results forpdflatexandxelatexin the TeX Live 2018: In pdflatex,Overfull \hbox (828.1069pt too wide). In xelatex,Overfull \hbox (828.48207pt too wide). – Akira Kakuto Oct 05 '18 at 09:17