Re: Export and ImageSize
- To: mathgroup at smc.vnet.net
- Subject: [mg36300] Re: [mg36187] Export and ImageSize
- From: Dale Horton <daleh at wolfram.com>
- Date: Fri, 30 Aug 2002 01:19:27 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
At 03:16 AM 8/26/2002, Selwyn Hollis wrote:
>I'm finding that the ImageSize option in Export has no effect when
>exporting Cell or Notebook objects. For instance, the following two
>commands produce precisely the same graphic:
>
> Export["image1.jpg", Cell["Some cell contents", "Text", FontSize -> 100]]
>
> Export["image2.jpg", Cell["Some cell contents", "Text", FontSize ->
>100], ImageSize -> {576, 288}]
>
>Has anyone encountered this problem before?
>
>(This is with Mathematica 4.1.5 and Mac OS X.)
>
>----
>Selwyn Hollis
>slhollis at mac.com
Export takes two options that control the size of a graphic, ImageSize and
ImageResolution. The difference is sometimes subtle. ImageSize changes the
coordinates while ImageResolution changes the size of objects. This may
sound like the same thing, but they're actually different.
If I have a plot with a line. Changing ImageSize changes the location of
the points in the line, which may make the line shorter or longer, but the
thickness is unchanged (if it is an AbsoluteThichness). ImageResolution
draws the image with a different number of pixels, so lengths and
thicknesses are changed. The same is true with fonts.
Why does it matter? Because there is no equivalent to ImageSize for cells
or notebooks. However, Magnification is a good equivalent of
ImageResolution. So ImageSize does nothing, but ImageResolution does.
In[1]:= cont=Cell["Some cell contents", "Text", FontSize -> 100]
In[2]:= Show@ImportString[ExportString[cont, "JPEG"], "JPEG"]
In[3]:= Show@ImportString[ExportString[cont, "JPEG", ImageResolution
->72*3/2], "JPEG"]
-Dale