Formats - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ImageTools

  

Formats

  

supported image I/O formats

 

Calling Sequence

Description

Examples

References

Calling Sequence

Formats

Description

• 

The Formats variable is a set containing the names of image formats supported by ImageTools[Read] and ImageTools[Write].

• 

ImageTools supports four image file formats: JPEG, TIFF, BMP, and PNG.

• 

The vast majority of existing JPEG files (as specified by the JPEG File Interchange Format standard, JFIF) can be read by ImageTools[Read], but there are a few exceptions. Most notably, JPEG files using hierarchical storage, lossless JPEG compression, arithmetic entropy encoding, DNL markers, or non-integral subsampling ratios are not supported. Fortunately, none of these features of the JPEG standard are in widespread use.

Only RGB, YCbCr, and Grayscale color spaces are supported. When reading a YCbCr image, it is converted to RGB on input. CMYK, YCCK, and proprietary color spaces are not supported.

When writing RGB images, ImageTools[Write] uses the YCbCr color space, which is the standard for JFIF formatted JPEG files. When writing grayscale images, the Grayscale color space is used.

JPEG reading and writing support is based on the Independent JPEG Group's "libjpeg", version 6.2. See copyright.

• 

Most TIFF files can be read by ImageTools[Read], including bi-level (black and white), grayscale, color mapped, RGB, fax, separated (CMYK), YCbCr, and JPEG-encoded TIFF images. Both compressed and non-compressed images are supported.

All TIFF images returned by ImageTools[Read] are converted to grayscale, RGB, or RGBA data.

When writing to TIFF files, ImageTools[Write] produces 8-bit per color channel, contiguous plane, LZW compressed, RGB or grayscale files (depending on the image data to be written).

TIFF reading and writing support is based on Silicon Graphics' "libtiff" library, version 3.6.1. See copyright.

• 

Maple can read all non-compressed Microsoft Windows BMP format files, including 1-bit monochrome, 4-bit and 8-bit color mapped, and 24-bit true color images. Compressed BMP formats are not supported, but the compression provided by BMP is so ineffective for most images that it is almost never used. OS/2 BMP format is also not supported.

When reading 1-bit, 4-bit, or 8-bit color mapped images, ImageTools[Read] returns grayscale data if all the colors in the image's color map are shades of gray, or RGB data otherwise.

Only 8-bit and 24-bit BMP files are supported by ImageTools[Write]. Grayscale data is written in 8-bit color mapped format (where all the colors are shades of gray). RGB data is written in 24-bit true color format.

• 

All PNG files can be read by ImageTools[Read].

When reading color mapped images, ImageTools[Read] returns grayscale data if all the colors are shades of gray, or RGB data otherwise. When reading grayscale images with an alpha channel, RGBA data is returned.

When writing a PNG file, ImageTools[Write] produces a 24-bit RGB, 32-bit RGBA, or 8-bit grayscale file depending on the image data being written.

Examples

withImageTools:

Formats

BMP,JPEG,PNG,TIFF

(1)

References

  

Independent JPEG Group http://www.ijg.org/

See Also

Formats

ImageTools

ImageTools[Read]

ImageTools[Write]