[Tex/LaTex] Including a jpg image, source code compilation in pdflatex doesn’t create pdf

graphicspdftex

I'm writing a report on a programming project in LaTeX and need to insert some images. I created images using a Finite Element program Freefem++, and saved the results in image files. I've tried png, jpeg, eps, and ps, but would like to use jpg, and none of them work so far. I've searched all over the internet, and it seems like my code should work, so I'm not sure what I'm missing.

\documentclass[a4paper,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[pdftex]{graphicx}
%\graphicspath{{images/}}
 \DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}   

\usepackage[english]{babel}
\begin{document}

\section*{Introduction}
\addcontentsline{toc}{section}{Introduction}


The domain considered will be

\begin{figure}
\begin{center}
\includegraphics{domain.jpg}
\end{center}
\end{figure}

\end{document}

I've tried with the file in a folder images and in the same folder as the doc, I've tried with and without the file extension, with and without [pdftex] and \DeclareGraphicsExtensions, etc.
It compiles with pdflatex and gives no errors, exit code 1, then when I try to view the pdf it says it doesn't exist, and asks if I've compiled the source code. If I compile with pdftex, it just creates a blank first page.
I've tried everything I can think of, I don't know what I'm missing. Perhaps a package I need to install on my computer? Or just a stupid mistake in the code?
Does anyone see my error? Thanks in advance!

Best Answer

The problem: apparently Freefem++ creates .jpg, .png, etc. images that are not readable by LaTeX. Thanks to the comments above telling me it was a problem with the image, I decided to try converting it to .jpeg (other formats probably would have worked as well, but I wanted jpg). To do this, I installed the ImageMagick package from terminal in linux, then used the convert command to create domain.jpeg:

$ convert domain.JPG domain.jpeg

This made the image usable, after that it was just formatting to get it to look right.

Related Question