Difference between revisions of "ExportImage Command"

From GeoGebra Manual
Jump to: navigation, search
(;<code>ExportImage("filename", "image.png", "transparent", true)</code> : Saves a transparent PNG file called "image.png")
(view -1 > 3D)
Line 15: Line 15:
  
 
;<code>ExportImage("filename", "image.png", "view", -1)</code>
 
;<code>ExportImage("filename", "image.png", "view", -1)</code>
: Saves a file called "image.png" of the current view
+
: Saves a file called "image.png" of View 3D Graphics 
  
 
;<code>ExportImage("filename", "image.png", "dpi", 300)</code>
 
;<code>ExportImage("filename", "image.png", "dpi", 300)</code>
Line 24: Line 24:
  
 
;<code>ExportImage("filename", "image.png", scalecm", 2, "dpi", 600)</code>
 
;<code>ExportImage("filename", "image.png", scalecm", 2, "dpi", 600)</code>
: Saves a file called "image.png" of the current view at 600dpi at a scale 1 unit = 2 cm
+
: Saves a file called "image.png" of the current view at 600 dpi at a scale 1 unit = 2 cm
  
 
;<code>ExportImage("filename", "image.png", "width", 1000)</code>
 
;<code>ExportImage("filename", "image.png", "width", 1000)</code>

Revision as of 16:54, 2 February 2018



ExportImage( <Property>, <Value>, <Property>, <Value>, ... )
Exports an image of the currently active view (or the view specified by the "view" parameter)

For example

ExportImage("scale", 5)
Shows a popup of the current view so that the user can right-click -> Save Image As...
ExportImage("filename", "image.png")
Saves a file called "image.png" of the current view
ExportImage("filename", "image.png", "view", 2)
Saves a file called "image.png" of Graphics View 2
ExportImage("filename", "image.png", "view", -1)
Saves a file called "image.png" of View 3D Graphics
ExportImage("filename", "image.png", "dpi", 300)
Saves a file called "image.png" of the current view at 300 dpi (dots-per-inch)
ExportImage("filename", "image.png", "scale", 2)
Saves a file called "image.png" of the current view at scale 2 (ie twice nominal screen resolution)
ExportImage("filename", "image.png", scalecm", 2, "dpi", 600)
Saves a file called "image.png" of the current view at 600 dpi at a scale 1 unit = 2 cm
ExportImage("filename", "image.png", "width", 1000)
Saves a file called "image.png" of the current view with width = 1000 pixels
ExportImage("filename", "image.png", "height", 1000)
Saves a file called "image.png" of the current view with height = 1000 pixels
ExportImage("filename", "image.png", "transparent", true)
Saves a transparent PNG file called "image.png"
ExportImage("filename", "image.svg", "type", "svg")
Saves a file called "image.svg" of the current view in SVG format
Notes:
  • In GeoGebra Classic 5 if there is no filename parameter the image will be copied to the clipboard. This may also be possible in the future (with browser support) in other versions
© 2024 International GeoGebra Institute