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:

  \caption{My Caption}
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – Speravir
    Commented Apr 22, 2014 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
    Commented Apr 22, 2014 at 3:07
  • 1
    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. Commented Apr 22, 2014 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
    Commented Apr 22, 2014 at 6:02

1 Answer 1


After a few hours of trial and error it turns out that a package setting for a different package was causing the problem in graphicx. I was using a template given to me by someone else which had:


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.

  • 3
    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
    Commented Apr 22, 2014 at 10:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .