Message Boards Message Boards

GROUPS:

Export W|A table as image?

Posted 3 years ago
2828 Views
|
3 Replies
|
2 Total Likes
|

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

3 Replies

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]

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

Good answer.

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}*)
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