How should I crop an image to use in a tikzpicture?

I declare an image in my header


Then I want to use a cropped version of myimage in a tikzpicture

    [...things being drawn...]

Is there an option akin to \includegraphics[trim={0 1cm 0 0}]{image}?

  • 5
    why not \node[inner sep=0pt]{\includegraphics[trim={0 1cm 0 0}]{image}};?
    – Ignasi
    Jun 26, 2018 at 13:13
  • @CarLaTeX Done!
    – Ignasi
    Apr 23, 2019 at 8:34

1 Answer 1


An \includegraphics command can be used in node's contents part, therefore if \includegraphics[trim={0 1cm 0 0}]{image} is the desired solution, just insert it into a node:

\node[inner sep=0pt]{\includegraphics[trim={0 1cm 0 0}]{image}};

inner sep=0pt is included to avoid any empty space between the image and node's border.

You must log in to answer this question.

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