Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Importing a .gif into a new notebook

  • To: mathgroup at
  • Subject: [mg25583] Re: [mg25560] Importing a .gif into a new notebook
  • From: John Fultz <jfultz at>
  • Date: Mon, 9 Oct 2000 21:43:24 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

At 03:36 AM 10/7/2000 -0400, Ken Levasseur-UML wrote:
>I'm having trouble doing the following:   Given the file name of a gif file,
>import the image, create a new notebook and paste the image into the notebook.
>I have no trouble importing the image and showing it through the sequence
>img=Import[afile, "GIF"]
>It's a Raster image, but that's ok.
>I had expected that, I could do this: to do essentially the same thing:
>NotebookWrite[temp, Import[afile, "GIF"]]
>But I keep getting cells with error boxes containing the Raster data.   I've
>tried several other variations, but with no success.   Anyone know the correct
>Ken Levasseur

In order for this to work correctly, you'd need to send up a correct Cell[] 
expression with PostScript.  Here's how you could do so...

nb = NotebookCreate[]
g = Import["some.gif"]
NotebookWrite[nb, Cell[GraphicsData["PostScript", ExportString[g, "MPS"]]]]


John Fultz
jfultz at
User Interface Group
Wolfram Research, Inc.

  • Prev by Date: Re: Graphing Hyperboloids
  • Next by Date: Re: Graphing Hyperboloids
  • Previous by thread: Importing a .gif into a new notebook
  • Next by thread: Complex Function Plot