High-Depth Image Formats

Gwyddion can export data to 16bit greyscale PNG, PNM and TIFF images and to OpenEXR images with half, float and 32bit data types. In case of 16bit images the full data range is always stretched to the full greyscale range; OpenEXR export permits to specify the value scaling factor.

When data are exported to a high-depth image additional information is stored to the file to enable automated loading back to Gwyddion without having to specify the dimensions and scales manually. By storing this additional information to image files you create in other programs, you can also make them directly loadable to Gwyddion with correct dimensions and scales. The information is organised as key-value pairs, stored using individual format-specific means for each format, described in the following table.

PNGtEXt chunks
OpenEXRnamed attributes
PNM header comments of the form # key: value

Most keys are identical to those used in Gwyddion Simple Fields, except for the added Gwy:: prefix, so see also GSF description for more details. Floating point values are stored directly if the format permits it (OpenEXR), otherwise a text representation of the number is used (in the C format). The keys are listed below.

Gwy::XRealfloating point Horizontal size in physical units (given by XYUnits), a positive floating point number.
Gwy::YRealfloating point Vertical size in physical units (given by XYUnits), a positive floating point number.
Gwy::XOffsetfloating point Horizontal offset in physical units (given by XYUnits).
Gwy::YOffsetfloating point Vertical offset in physical units (given by XYUnits).
Gwy::ZScalefloating point Value scaling factor. Image data are to be multiplied by this factor to obtain physical values. This parameter is usually used with limited-range floating point formats such as half. For integer data, Gwy::ZMin and Gwy::ZMax is usually used.
Gwy::ZMinfloating point Value in physical units corresponding to the minimum value representable in the image (normally 0).
Gwy::ZMaxfloating point Value in physical units corresponding to the maximum value representable in the image.
Gwy::XYUnitsstring Lateral units, i.e. units of physical sizes and offsets.
Gwy::ZUnitsstring Value units, i.e. units of data values.
Gwy::Titlestring Data/channel title.

In case of PNG, the scaling information is also stored in the standard sCAL and pCAL chunks (with linear scaling formula). Conversely, if these chunks are present (and the Gwyddion-specific are absent) the information from them is used in import. See the PNG specifiation for the chunk description.