MathGroup Archive 1999

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

Search the Archive

Re: Programming the front end to save graphics files

  • To: mathgroup at
  • Subject: [mg15711] Re: Programming the front end to save graphics files
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 5 Feb 1999 03:42:11 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <79531n$>
  • Sender: owner-wri-mathgroup at

Hi Malcom,

why use the frontend ?

Say You have a notebook (the simples way is

than the function

             fname=fpre <>ToString[First[#2]]<> "."<>ToLowerCase[type];
            )& ,

will save graphic cells if you write


Hope that helps

Malcolm Boshier wrote:
>     Since the kernel function Display[ ] can't save graphics in the
> Windows bitmap format, I'm trying to program the front end to do it via
> the Save Selection As... menu option.  I know that it's straightforward
> to use Display[ ] to save the cells as PBM's and then convert these
> files to BMPs using a suitable program, but using the front end
> directly would be simpler and knowing how to program it seems like a
> useful skill, so I'd like to get this working.
>     So far I've found that the selecting a graphic and then executing
> the command
>                   FrontEndExecute[FrontEndToken[nb,
> "SelectionSaveSpecial","MGF"]]
> brings up the file Save As dialog box and then saves the graphics
> correctly when the filename is typed in.  I'd eventually like to write
> a function which looks like Display[ ], so I'd obviously like to avoid
> the Save As dialog box - does anybody know if it's possible to include
> a channel or filename directly in the expression above, or bypass the
> dialog box in some other way?
> thanks,
> Malcolm

  • Prev by Date: Speed (resumed)
  • Next by Date: How to use DisplayTogether[] properly?
  • Previous by thread: Programming the front end to save graphics files
  • Next by thread: Mathematica as an Object