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.
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.
Key | Type | Meaning |
---|---|---|
Gwy::XReal | floating point |
Horizontal size in physical units (given by
XYUnits ), a positive floating point number.
|
Gwy::YReal | floating point |
Vertical size in physical units (given by
XYUnits ), a positive floating point number.
|
Gwy::XOffset | floating point |
Horizontal offset in physical units (given by
XYUnits ).
|
Gwy::YOffset | floating point |
Vertical offset in physical units (given by
XYUnits ).
|
Gwy::ZScale | floating 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::ZMin | floating point | Value in physical units corresponding to the minimum value representable in the image (normally 0). |
Gwy::ZMax | floating point | Value in physical units corresponding to the maximum value representable in the image. |
Gwy::XYUnits | string | Lateral units, i.e. units of physical sizes and offsets. |
Gwy::ZUnits | string | Value units, i.e. units of data values. |
Gwy::Title | string | 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.