1

When I do the following:

  \includegraphics[width=1.0\textwidth]{image.jpg}

The space where the image should be, is correctly scaled to the size of the scaled image, but the image itself doesn't scale. So i still have a HUGE image, with the correct starting coordinate in the left bottom corner.

Any ideas why the image doesn't scale, but the space where the image should be does?

EDIT: not cropping, but scaling

  • Perhaps the clip=true option to \includegraphics will help. And welcome to TeX.SX! – user31729 Aug 4 '14 at 8:09
  • adding that doesn't do anything – Napje Aug 4 '14 at 8:18
  • if width=\textwidth dosn't work then there is something wrong with your image. Make it available for a download to test it. – user2478 Aug 4 '14 at 8:27
  • 1
    @Napje: It was just a proposition... without a MWE and the file at hand it is very difficult to make qualified propositions – user31729 Aug 4 '14 at 9:11
1

The command you're giving does not crop/trim your image. To do that, you have to use the trim option of includegraphics like so (see this post on texblog for more info). When you replace left, bottom, right and top by length values you see how your image is cropped.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{blindtext}

\begin{document}

\blindtext

\begin{figure}[h]
    \centering
    \includegraphics[trim=left bottom right top, clip]{file}
    \caption{default}
    \label{default}
\end{figure}

\blindtext

\end{document}
  • Well, it doesnt need trimming/cropping, it need to scale to the page width – Napje Aug 4 '14 at 8:18
  • This was not clear for me from your question. Please update your question with a minimal working example including the original image if possible. – Habi Aug 4 '14 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.