5

Is it possible to include only half an image? I'm looking to include only the right half of an image and discard the left half.

If there is a simple way to accomplish that, it would make more sense in my case than to generate new images.

Scott H.
  • 11,047
Tim N
  • 10,219
  • 13
  • 63
  • 88

1 Answers1

10

You should use the crop and trim options for \includegraphics command.

Example:

\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{image}

The options for trim is: trim=left bottom right top, where it cropped by the appropriate amount from the sides.

So, including only the right half would look like:

\newlength{\imagewidth}
\settowidth{\imagewidth}{\includegraphics{image}}
\includegraphics[trim=0.5\imagewidth{} 0 0 0, clip, width = 0.1\imagewidth{}]{image}

Check the code.

m0nhawk
  • 9,664