Message Boards Message Boards

Export W|A table as image?

Posted 8 years ago

I would like to take a table from a Wolfram/Alpha output pod and export it as an image. The code below is an example:

WolframAlpha["Wind Turbine Formula", {{"Equation", 1}, "Content"}]

This code results in a beautiful table, but my attempts to turn it into an image and resize it have failed. The resulting image should resize to fill a 360 × 360 space (without changing the aspect ratio, of course). I have tried Image[] and Graphics[], both of which complain that I'm not feeding them the right kind of parameters. Magnify[], though not producing an image, does resize the table but requires that I know the table's original size or the needed scale factor.

I assume that the solution is simple, so I apologize for being clueless.

Thanks in Advance,

Mark Greenberg

POSTED BY: Mark Greenberg
3 Replies

It is beautiful. ImageSize -> {Automatic, 360} will help keep the tall side in your 360 box.

Export["turbine.png", Magnify[
  WolframAlpha["Wind Turbine Formula", {{"Equation", 1}, "Content"}],
  2], ImageSize -> {Automatic, 360}] 

ImageDimensions@Import["turbine.png"]
(*{294,360}*)

Export

Export["turbine.png", 
 WolframAlpha["Wind Turbine Formula", {{"Equation", 1}, "Content"}], 
 ImageSize -> 360]

Rasterize

ImageResize[
 Rasterize[WolframAlpha["Wind Turbine Formula", {{"Equation", 1}, "Content"}]], 
360]

PodImages

ImageResize[
 WolframAlpha["Wind Turbine Formula", "PodImages"][[2]],
 360]
Posted 8 years ago

Perfect, thank you. Looks like I'd better Magnify[] the table first before rasterizing it so as to avoid pixelization.

Good answer.

POSTED BY: Mark Greenberg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract