[Tex/LaTex] Proper use of bounding box (bb) option of \includegraphics


What is the correct way of using bounding box (bb) option of \includegraphics?

I have tried several options with different sample files with no luck.


   \fbox{\includegraphics[bb=0 0 200 30]{temp.png}}\\
   \fbox{\includegraphics[bb=0 0 200 30]{fig.png}}\\
   \fbox{\includegraphics[bb=0 0 200 30]{fig.pdf}}\\
   \fbox{\includegraphics[bb=0 0 7cm 2cm]{fig.pdf}}\\


enter image description here

All graphics files in the above MWE can be downloaded from my OneDrive folder:


Best Answer

bb is really only intended for correcting EPS files with incorrect bounding boxes (or PS files that you want to treat as EPS by supplying a missing bounding box)

If you want to trim an existing figure use the viewport, trim or clip options (which just differ in the way in which the coordinates of the region are specified)