MathGroup Archive 2007

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

Search the Archive

RE: Importing and retaining graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75209] RE: [mg75169] Importing and retaining graphics
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Fri, 20 Apr 2007 00:43:38 -0400 (EDT)
  • References: <200704190832.EAA04133@smc.vnet.net>

Hi Anthony,

> OK, I've learned that
>    Import["/Users/AES/Desktop/myImage.jpg"]
> 
> will import an image from my Mac desktop into a notebook, and then
> 
>    Show[%, ImageSize->3*72]
> 
> will display it.  But:
> 
> 1)  How do I then "freeze" or retain that graphic or that 
> image, in a displayed or rendered form, as a permanently 
> retained and displayed image cell in this notebook, with the 
> two lines above deleted?  

I usually do this by selecting the graphic from a temporary notebook used to
Import[] the graphic to the notebook I want it in, then pasteing it to the
notebook I want it in.  This can also be done from other applications.

> 2) Is there an easier way, on a Mac, to Drag and Drop, or 
> Copy and Paste, a JPEG image like this (or a PDF page), from 
> the Finder or some Mac app into a notebook, as a permanently 
> retained cell in that notebook?  (Permanently retained until 
> explicitly deleted, that is.)

It dosen't get much easier than "cut & paste".  You can do this from within
Mathematica, or from most other graphics applications to Mathematica.  

Since the graphic is just a bitmap, there is no information that enables it
to be regenerated when the cell is evaluated.  In other words, selecting the
cell and evaluating it only redraws the bitmap image.  It does not Import[]
the image again.

> 3)  What Format => Style do I assign to "permanently retained 
> image cells" like this?  
> 
> (I'd prefer that they not have the same style as graphics 
> cells that are generated anew each time the notebook is 
> executed; I don't want them to be selected when I 
> Option-click on an generated image cell boundary, or to be 
> included in animations of generated cells.)

As with any cell in a notebook, you can do what you like.  When last I did
this, I used NumberedFigure since I wanted a numbered figure.  There's
nothing to stop you defining your own style that you use for these graphics.

Is there any particular reason that you'd want a separate style?  For
example, a separate style won't, so far as I know, stop their inclusion in a
manual selection, but it might in a programmatic selection.
 
> 4)  Would Wolfram maybe want to add to the Help documentation 
> for Import[] a pointer to the use of $Path?  
> 
> Took me a lot of searching around before I discovered how to 
> format the right path, and what paths Import[] actually searched.

There is section 2.12.4 (Naming & Finding Files).  The way Import[] handles
files is no different to the way any other command handles files, so this
question suggests an unfamiliarity with file handling and possibly the
underlying OS rather than a deficiency in Import[]'s documentation.

Regards,

Dave.


  • Prev by Date: Re: Importing and retaining graphics
  • Next by Date: Re: Re: LegendreP Evaluation Mystery
  • Previous by thread: Re: Importing and retaining graphics
  • Next by thread: Intersection question