# includegraphics image resolution stopped working

Using texlive 2016 and TeXstudio 2.12.6, the following example worked:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[resolution=300]{figure.png}
\end{document}


Then I did this:

tlmgr update --self
tlmgr update --all


Now, the same example gives the following error:

! Package keyval Error: resolution undefined.


How can I figure out what changed, and in which package(s)?

The resolution key was amongst a rather large number that had 'appeared' in pdftex.def but were not supported in graphics and were undocumented. As part of the process of bringing .def support back 'in house' to the LaTeX team, these various keys were removed with some then being re-introduced in the graphics core (and documented). The resolution key is not currently supported: the team would need to see good reasons for adding this to the main body of graphics.
• @DavidCarlisle I did some tests, and it seems that the density value embedded in the PNG file is ignored. In that case, scale and density are the same. I assumed that the scale is applied after adapting to the the PNG's density, and "resolution" overwrites it. Not so, it seems. If you take two pictures with the same amount of pixels in the x and y directions, but different densities, they still look the same in this example: \documentclass{article}\usepackage{graphicx}\begin{document}\includegraphics[scale=0.24]{figure_72dpi.png}\includegraphics[scale=0.24]{figure_300dpi.png}\end{document} Sep 22, 2017 at 12:40
• I was using this in a command to detect low-resolution images and display it in a smaller size with beamer, but I'm not sure if this realy worked: \settowidth{\imagewidth}{\includegraphics[resolution=150]{#1}} and later \ifdim\imagewidth>500pt then use special command for low-res images. Nov 19, 2017 at 17:21