Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Import Images and Displaying

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89316] Import Images and Displaying
  • From: N K <nk200810 at yahoo.com>
  • Date: Thu, 5 Jun 2008 00:44:18 -0400 (EDT)
  • Reply-to: nk200810 at yahoo.com

Hi everyone,
I have an image called img.gif . I would like to read in this image using Mathematica.
After that, I would like to display this image on the screen (as a separate pop-up). The size of this should be determined by the size of my screen. 

I have done the following:

nb = NotebookCreate[
      WindowSize -> {screenWidth, screenHeight},
      WindowMargins -> {{0, Automatic}, {Automatic, 0}}
      ];
NotebookWrite[nb, "ReadList[\"file.txt\"]"];
SelectionMove[nb, All, CellContents];
SelectionEvaluate[nb];

file.txt contains:
bl = Import["img.gif"];
Show[bl, ImageSize->{screenWidth, screenHeight}];

This works, however, in my original image there is no white background around the img.gif. Importing it in Mathematica adds a thick layer of the white around the original image. This makes my img.gif much smaller than what it is in reality. 

Any suggestions on this would be very helpful.

Thanks very much,


      



  • Prev by Date: Bizarre Running Times
  • Next by Date: Re: Problems with Simplify
  • Previous by thread: Re: Bizarre Running Times
  • Next by thread: Re: Clever Solution, How to quickly incorporate to palette? Re: