MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Export of Cells in Bitmap

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31290] Re: [mg31254] Export of Cells in Bitmap
  • From: Dale Horton <daleh at wolfram.com>
  • Date: Fri, 26 Oct 2001 04:28:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

At 03:53 AM 10/23/2001, Martin Stockhammer wrote:

>Hello,
>
>I want to export some cells into a bitmap format with a
>high resolution.
>
>The command
>Export["Image.tif",
>    Cell["This is a test", "Input",
>      PageWidth -> Infinity], "TIFF", ImageResolution -> 300]
>
>yields a image file but the text in the image is cut.
>Do I have to set some cell-size, or pagesize options?
>
>The file is attached. [Contact the author to get this file - moderator]
>
>Thank You
>
>Martin Stockhammer

To understand this behavior you have to understand the Export process. 
Export uses the front end to render the cells and then the rendering is 
converted to Tiff format. If you do,

Export["Image.tif", Cell["This is a test", "Input"], "TIFF"]

then the Image is fine. But you want to increase the resolution so then you do

Export["Image.tif", Cell["This is a test", "Input"], "TIFF", 
ImageResolution->300]

Again, the image is fine, but now it includes line wrapping. Why? It's like 
increasing the Magnification. If rendered in the front end with the 
appropriate Magnification and WindowSize, then there would be line wrapping.

So the question becomes, how do you control the line wrapping? By setting 
PageWidth->Infinity, you do turn it off, but think about how it would look 
in the front end. You wouldn't see the whole cell without scrolling, so the 
TIFF gets cut off.

Instead, you want to change the size of the window that the cell would be in.

Export["Image.tif",
  Notebook[{Cell["This is a test", "Input", ShowCellBracket->False]},
     WindowSize->{1000,Automatic}], "TIFF", ImageResolution->300]

-Dale



  • Prev by Date: Re: Zero does not Equal Zero
  • Next by Date: Re: Function Coloring with ParametricPlot3D
  • Previous by thread: Export of Cells in Bitmap
  • Next by thread: What is the best approach to solving the following set of equations ?