# Cropping/Trimming an image with includegraphics by specifying percentages

Say I have an image my_image.png that I am loading in my LaTeX document using:

\begin{figure}
\includegraphics[width=0.5cm]{my_image.png}}
\end{figure}


Is there a way of telling LaTeX to only render a specific rectangular portion (in percentages) of the original image?

For example, say I want to just render a cropped image:

• Trim 5% of the original image width from the left
• Trim 10% of the original image width from the right
• Trim 15% of the original image height from the top
• Trim 20% of the original image height from the bottom
-
have a look at the package adjustbox with the option export. –  Marco Daniel Apr 20 '12 at 14:10

\documentclass{article}
\usepackage{graphicx}

Since \includegraphics produces no depth, you can use the fact that \adjustbox knows the \width and the \height of the image.