Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

5.5 CREATING GIF IMAGES


See the FRAME command for the options for image file format with PyFerret.

GIF is a highly compressed format suitable for single images. (Ferret will not directly create GIF89 animations.) The procedure for creating a GIF image is nearly identical to the creation of a single frame of an HDF file. The modification is generally just to select a file name with the ".gif" extension; Ferret will automatically sense this as a request to create a GIF-formatted image file. Alternatively, any file name can be used if the GIF format is specified explicitly using

FRAME/FORMAT=GIF

If a number of GIF images are created using the same file name Ferret will automatically rename subsequent versions with a version number. Thus a repeat loop can be used to generate many GIF images.

Example:

REPEAT/L=1:12(FILL sst; GO fland; FRAME/file=myimage.gif)

Note: In this mode of grabbing an image, Ferret creates a GIF file by requesting the image back from your screen (your X server). In order for Ferret to correctly grab the image, the X server should be configured to be running either in 8-bit PseudoColor mode (i.e. direct color) or 24-bit TrueColor mode (i.e. indexed color) with X server backing store enabled. If the X server is configured in 16-bit TrueColor (also indexed color) mode, Ferret will be unable to grab the GIF image from the X server.

An alternative approach to creating GIF's (which does not share this restriction) is to invoke Ferret with the -gif command line switch "ferret -gif".