<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html> <head> <title>GrADS Commands: printim</title> </head> <body bgcolor="e0f0ff" text="#000000"> <h2><b>printim</b></h2> <p> The <code>printim</code> command will produce a PNG, GIF, or JPG formatted image file based on the current contents of the metabuffer, which is usually the stuff displayed on the screen, minus any widgets. The syntax is: <p> <ul> <code>printim <i>filename options</i></code> </ul> <p> where: <p> <ul> <code><i>filename:</i> </code>The name of the output file. If this file exists, it will be replaced. <br> <code> </code>If the filename ends with ".png" or ".PNG" then GrADS will automatically create the image in PNG format<br> <code> </code>If the filename ends with ".gif" or ".GIF" then GrADS will automatically create the image in GIF format<br> <code> </code>If the filename ends with ".jpg" or ".JPG" then GrADS will automatically create the image in JPEG format<br> <p> <code><i>options:</i> png </code> - produce PNG output (default)<br> <code> gif </code> - produce GIF output <br> <code> jpg </code> - produce JPEG output <br> <code> black </code> - use black background (default is current display setting)<br> <code> white </code> - use white background (default is current display setting)<br> <code> xNNN </code> - horizontal size in NNN pixels<br> <code> yNNN </code> - vertical size in NNN pixels<br> <code> -t NN </code> - color number NN is transparent<br> <code> -b <i>bgImage</i> </code> - Image file <code><i>bgImage</i></code> s included in the background of the output. <br> <code> -f <i>fgImage</i> </code> - Image file <code><i>fgImage</i></code> is included in the foreground of the output.<br> </p> </ul> <p> One or more <code><i>options</i></code> may be given in any order. <code><i>bgImage</i></code> and <code><i>fgImage</i></code> must be PNG format. <p> <h3>Usage Notes</h3> <ol> <li><code>printim</code> works with GrADS version 1.8 (or higher). <li><code>printim</code> can be used while in batch mode. <li>The option for JPEG formatted output became 'official' with version 2.0.a5. </ol> <p> <h3>Examples </h3> <p> The following command produces a 1000x800 PNG image into file out.png: <p> <ul><code>printim out.png x1000 y800</code></ul> <p> This command produces a 800x600 GIF image, with a white background, into file gifimage.out: <p> <ul> <p><code>printim gifimage.out gif x800 y600 white</code></p> </ul> <p>This command produces a GIF image with transparent color 0 and a background image mybkg.png. This means that in image.gif, the background image mybkg.png will be seen wherever the color 0 (background) appeared in the current display. </p> <ul> <p><code>printim image.gif -b mybkg.png -t 0 </code><br> </ul> </body> </html>