[Tex/LaTex] Show actual size of image with \includegraphics

graphicsresolutionsize;

Problem:

I'm trying to display a photo that is 299 x 153 pixels (300 dpi) in a document but it gets "shrinked" for some reason.

The actual photo:

enter image description here

Minimal Working Example (MWE):

\documentclass[export]{article}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{ragged2e}
\usepackage{fancyvrb}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{menukeys}
\usepackage{tikz}
\usepackage{makecell}
\usepackage{xparse}
\usepackage{cellspace,tabularx}
\usepackage{adjustbox}

\let\oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[2][]{\oldincludegraphics[valign=c,#1]{#2}}

\begin{document}

\begin{figure}[tbh]
  \includegraphics{phpmyadmin-dropdatabase-op.png}
  \caption{Text.}
  \label{fig:phpma-dropdbop}
\end{figure}

\end{document}

The output:

enter image description here

Desired outcome:

To get the actual size of the photo to output in the .tex document as indicated by the first photo.

Best Answer

Use:

\includegraphics[scale=1]{phpmyadmin-dropdatabase-op.png}

to get the actual size, if you want to fill in the width of the page, use:

\includegraphics[width=\textwidth]{phpmyadmin-dropdatabase-op.png}

if you want to limit the height in some way, use something like:

\includegraphics[height=0.5\textheight]{phpmyadmin-dropdatabase-op.png}

or

\includegraphics[height=10cm]{phpmyadmin-dropdatabase-op.png}
Related Question