Home > Archive > Tex > October 2006 > scaling and positioning a jpeg that is too large
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
scaling and positioning a jpeg that is too large
|
|
| scott cunningham 2006-10-30, 7:44 pm |
| Where can I learn more about scaling down a jpeg that I've included in
my file? I've included it like this:
\includegraphics{wsr.jpg}
\caption{Map of the United States}
\end{figure}
The map that appears is too far to the right, and ends up cutting off
some of the map, and completely cuts off the legend that appears at the
bottom right of the jpeg. I need to manually reposition the jpeg to
fit the page, but I am not sure how to do this. Apologies if this has
been repeatedly discussed.
| |
| scott cunningham 2006-10-30, 7:44 pm |
|
Okay, I am digging through the many threads that have appeared on this
very problem. Let me work through those suggestions, and if I cannot
fix the problem on my own, I'm going to write a minimal document and
post it to see if I can find the problem. So if you're reading this,
please don't respond. I was being lazy for not digging through the
threads first.
On Oct 30, 9:57 am, "scott cunningham" <scunn...@gmail.com> wrote:
> Where can I learn more about scaling down a jpeg that I've included in
> my file? I've included it like this:
>
> \includegraphics{wsr.jpg}
> \caption{Map of the United States}
> \end{figure}
>
> The map that appears is too far to the right, and ends up cutting off
> some of the map, and completely cuts off the legend that appears at the
> bottom right of the jpeg. I need to manually reposition the jpeg to
> fit the page, but I am not sure how to do this. Apologies if this has
> been repeatedly discussed.
| |
| scott cunningham 2006-10-30, 7:44 pm |
| I'm trying to include a thematic map to a document. The minimal
document below manages to scale the picture to fit, but it's not
centered on the page despite using \centering. Secondly, the legend is
still so small that it's not legible. If I blow it up anymore, then
the legend (bottom right) is cropped out. I think I need to blow the
scaling up larger while also forcing the graphic to appear closer to
the left side of the page. That way, it's legible, and there's enough
room for the legend to be read. Can someone point me in the right
direction?
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[!hbt]
\centering
\includegraphics[scale=.80]{bsr.jpg}
\end{figure}
\end{document}
| |
| Heiko Oberdiek 2006-10-30, 7:44 pm |
| "scott cunningham" <scunning@gmail.com> wrote:
> Where can I learn more about scaling down a jpeg that I've included in
> my file? I've included it like this:
>
> \includegraphics{wsr.jpg}
See grfguide (TDS:doc/latex/graphics/grfguide.*).
Yours sincerely
Heiko <oberdiek@uni-freiburg.de>
| |
| Ulrike Fischer 2006-10-30, 7:44 pm |
| "scott cunningham" <scunning@gmail.com> schrieb:
> I'm trying to include a thematic map to a document. The minimal
> document below manages to scale the picture to fit, but it's not
> centered on the page despite using \centering. Secondly, the legend is
> still so small that it's not legible. If I blow it up anymore, then
> the legend (bottom right) is cropped out. I think I need to blow the
> scaling up larger while also forcing the graphic to appear closer to
> the left side of the page. That way, it's legible, and there's enough
> room for the legend to be read. Can someone point me in the right
> direction?
jpg are bitmaps. Scaling them is not a good idea - there will always be
a loss of quality.
If possible use vector graphics. If this is not possible, use a graphic
software to scale the image to the correct size (and to perhaps trim
white spaces). If possible don't use the legend in the jpg but type it
under the image, the quality will much better.
--
Ulrike Fischer
e-mail: zusätzlich meinen Vornamen vor dem @ einfügen.
e-mail: add my first name between the news and the @.
| |
| scott cunningham 2006-10-30, 7:44 pm |
| > If possible use vector graphics. If this is not possible, use a graphic
> software to scale the image to the correct size (and to perhaps trim
> white spaces). If possible don't use the legend in the jpg but type it
> under the image, the quality will much better.
So, the only real solution, you're saying, is to alter the jpeg. It's
not possible for me to force the object more to the left in the
document?
| |
| Christine Niebler 2006-10-30, 7:44 pm |
| Did you already try to make the image as large as the textwidth?
\begin{figure}
\centering
\includegraphics[width=\textwidth]{bsr.jpg}
\end{figure}
If this doesn't solve your problem, please figure out more precise,
whether the caption or a legend in the image is too small.
BR,
Christine
| |
| Heiko Oberdiek 2006-10-30, 7:44 pm |
| "scott cunningham" <scunning@gmail.com> wrote:
> I'm trying to include a thematic map to a document. The minimal
> document below manages to scale the picture to fit, but it's not
> centered on the page despite using \centering.
It is centered unless you have an overfull \hbox or
asymmetric white margins inside the image.
And if you are using full width:
\includegraphics[width=\linewidth]{bsr.jpg}
Yours sincerely
Heiko <oberdiek@uni-freiburg.de>
| |
| Ulrike Fischer 2006-10-31, 4:08 am |
| "scott cunningham" <scunning@gmail.com> schrieb:
>
> So, the only real solution, you're saying, is to alter the jpeg. It's
> not possible for me to force the object more to the left in the
> document?
You can put your image where you want. The commands depends of your
image, e.g. if there is a white or transparent border. grfguide
contains a lot of options to trim and scale the image or to change the
viewport. And there are a lot of commands to move objects around like
\hspace* or \put from the picture environment.
--
Ulrike Fischer
e-mail: zusätzlich meinen Vornamen vor dem @ einfügen.
e-mail: add my first name between the news and the @.
| |
| Robin Fairbairns 2006-10-31, 8:03 am |
| "scott cunningham" <scunning@gmail.com> writes:
>
>So, the only real solution, you're saying, is to alter the jpeg. It's
>not possible for me to force the object more to the left in the
>document?
the jpeg obviously contains white space outside the picture area:
that's what's causing the problem. so you want to get rid of that
stuff.
if you've an appropriate package, i would recommend simply editing the
image to chop off the troublesome borders ... but you don't _have_ to
do that.
you _do_ have to find out, however, where the real picture sits (in
coordinate terms) in your image. a simple scheme for that is:
1. open the image in a viewer of some sort and get a feel for the
proportions of the image that are white (if you have a viewer that
will report where your cursor "is", the task becomes a whole lot
easier)
2. run ebb (a dvipdfm app) on the image to find out what the nominal
dimensions of the image are
3. use the information from step 1 to work out the actual range of
image coordinates
now, suppose the coordinates are (llx, lly) to (urx, ury), you need to
use the viewport and clip keywords of \includegraphics:
\includegraphics[viewport=llx lly urx ury, clip]{your_image}
and there you are.
in my experience the calculated coordinates are never quite right
first time, but it's a fairly simple matter to iterate until things
are right.
--
Robin Fairbairns, Cambridge
|
|
|
|
|