# [Tex/LaTex] Figure length and width

graphics

I would like to add a figure, but I would like to control both width and length of figure. I know to control length and width separately but not together. Could anyone let me know the command to do that.

I am using the following commands:

\begin{figure}[H]
\centering
\includegraphics[height=8cm]{Images/abc}
\caption{abc}
\label{fig:abc}
\end{figure}


Here you are:

\documentclass{report}
\usepackage[english]{babel}
\usepackage{graphicx}

\begin{document}
\includegraphics[height=3cm]{example-image-b}
\includegraphics[width=5cm]{example-image-b}

\includegraphics[height=3cm, width=3cm]{example-image-b}
\includegraphics[height=3cm, width=6cm]{example-image-b}
\includegraphics[keepaspectratio,height=3cm, width=6cm]{example-image-b}
\end{document}


And the result:

Be very careful! By defining both height and width, you will distort the aspect ratio of the images. See the manual of the graphics bundle for more details and how to avoid distortions. To avoid the distortion, you can use the keepaspectratio-option, as presented in the last command.