more Export trouble
- To: mathgroup at smc.vnet.net
- Subject: [mg36517] more Export trouble
- From: Selwyn Hollis <slhollis at earthlink.net>
- Date: Tue, 10 Sep 2002 06:24:50 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The following is a button that will export a selected graphic as a JPEG, with filename constructed from Date[]. ButtonBox["JPEG", ButtonFunction :> Module[{sel}, SelectionMove[InputNotebook[], All, Cell]; sel = NotebookRead[InputNotebook[]]; If[Head[sel] === Cell, If[!ValueQ[dpi], dpi = Automatic]; Export[StringJoin[ToString /@ Rest[Date[]]]<>".jpg", sel, ImageSize -> Automatic, ImageResolution -> dpi, ConversionOptions -> {"Quality" -> 75}]]], ButtonEvaluator -> Automatic, Active -> True]//DisplayForm It works fine as long as the graphic is no wider than about 330 pixels. If the graphic is wider than 330 pixels, then the size of exported graphic is correct, but everything on the right beyond the first 330 pixels is blank. There seems to be no problem with the height though. Any ideas on how to fix or get around this problem? --- Selwyn Hollis