# Problem sizing the image with \includegraphics

This question is very similar to Image from \includegraphics showing in wrong image size, but not quite the same.

The size of the image that appears in my manuscript depends entirely on the dpi setting I give it in IrfanView. It doesn't matter which width or scale settings I use - these settings only determine the horizontal and vertical offset of my image. Now I have tried including the same image in both .png and .pdf format, always the same result.

However, I have used .eps figures a lot, and there it very easy to change the size with a simple width. Is it somehow possible to do the same with figures that are not .eps? I will be dealing with a lot of figures in the next few months and would prefer controlling the image size directly from within LaTeX, instead of having to go through another program.

I am using pdflatex with the graphicx package and define my figure as such:

\begin{figure}[ht]
\centering
\includegraphics[width=0.8\textwidth]{MyFigure.png}
\caption{My Caption}
\label{fig::myFig}
\end{figure}

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Speravir Apr 22 '14 at 2:56
• As far as I know you have to set all images to the same dpi before you use them in TeX. See DPI for imported bitmaps. And Uncertain about dpi in LaTeX and comments. Or in general the tag resolution. – Speravir Apr 22 '14 at 3:07
• The package graphics knows the following driver options: dvips, xdvi, dvipdf, dvipdfm, dvipdfmx, xetex, pdftex, dviwindo, emtex, dviwin, oztex, textures, pctexps, pctexwin, pctexhp, pctex32, truetex, tcidvi, vtex. Each DVI driver or TeX engine has different capabilities regarding images. Therefore it is quite important to know, which driver you are using. Also add a MWE to clarify, what you are doing. I know about keys width and scale for \includegraphics of package graphicx. But \width and \scale settings could mean something different. – Heiko Oberdiek Apr 22 '14 at 3:57
• Thank you for your suggestions and my excuses for not being very clear. I have found and posted the solution, and have added details to the original question. – chnaideur Apr 22 '14 at 6:02

\usepackage[usenames,dvips]{color}

defined. Alas, the dvips option was causing the problem. Removing it I am now able to include a .png with \includegraphics and set the size with the the width option.
• Never set options such as dvips or pdftex to color, xcolor or graphicx; this limits portability and those packages are able to figure out the current typesetting engine by themselves. – egreg Apr 22 '14 at 10:16