Image

Base Images

class fileformats.image.RasterImage(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.VectorImage(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, UnicodeFile

Raster

class fileformats.image.Gif(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, RasterImage

class fileformats.image.Jpeg(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, RasterImage

class fileformats.image.Png(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, RasterImage

class fileformats.image.Tiff(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: RasterImage

Vector

class fileformats.image.Svg[source]

Bases: InformalSchema

Unclassified

class fileformats.image.Aces(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

TODO: or 76 2F 31 01 02 04 00 00 The attribute acesImageContainerFlag has value 1

class fileformats.image.Apng(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Avci(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Avcs(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Avif(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Bitmap(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, RasterImage

class fileformats.image.Cgm(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.DicomRle(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Dpx(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

TODO: 0x53445058 (most-significant byte first file) or 58 50

class fileformats.image.Emf(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

Office productivity applications; clip art applications; desktop publishing applications; some web browsers (e.g., Internet Explorer).

TODO: 0x01000000 (little-endian DWORD 0x00000001), corresponding to the EMR_HEADER Type field. The next field (EMR_HEADER Size) should be at least 88 (little- endian DWORD 0x00000050).

class fileformats.image.Fits(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

There are many astronomical image viewing and data reduction

A FITS file described with the media type "image/fits" SHOULD have a PHDU with positive integer values for the NAXIS and NAXISn keywords, and hence SHOULD contain at least one pixel. Files with 4 or more non-degenerate axes (NAXISn>1) SHOULD be described as "application/fits", not as "image/fits". (In rare cases it may be appropriate to describe a NULL image -- a dataless container for FITS keywords, with NAXIS=0 or NAXISn=0 -- or an image with 4+ non- degenerate axes as "image/fits" but this usage is discouraged because such files may confuse simple image viewer applications.) FITS files declared as "image/fits" MAY also have one or more conforming XHDUs following their PHDUs. These extension HDUs MAY contain standard, non-linear, world coordinate system (WCS) information in the form of tables or images. The extension HDUs MAY also contain other, non-standard metadata pertaining to the image in the PHDU in the forms of keywords and tables. A FITS file described with the media type "image/fits" SHOULD be principally intended to communicate the single data array in the PHDU. This means that "image/fits" SHOULD NOT be applied to FITS files containing MEF (multi-exposure-frame) mosaic images. Also, random groups files MUST be described as "application/fits" and not as "image/fits". A FITS file described with the media type "image/fits" is also valid as a file of media type "application/fits". The choice of classification depends on the context and intended usage.

TODO: "SIMPLE = T" Jeff Uphoff of the National Radio Astronomy Observatory (NRAO) has contributed database entries for the magic number file which is used by the Unix "file" command. Magic number files with these entries are distributed with a variety of Unix-like operating systems. In addition to recognizing a FITS file using the string given above, the Uphoff entries also recognize the data type of the pixels in the PHDU.

class fileformats.image.G3fax(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Heic(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.HeicSequence(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Heif(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.HeifSequence(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Hej2k(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Hsj2(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.J2c(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jls(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Jp2(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jph(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

TODO: See Section 4.4 of RFC 3745

class fileformats.image.Jphc(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jpm(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jpx(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jxr(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

Imaging, fax, messaging and multimedia.

TODO: Data begins with a FILE_HEADER( ) data structure, which begins with a FIXED_FILE_HEADER_II_2BYTES field equal to 0x4949, followed by a FIXED_FILE_HEADER_0XBC_BYTE field equal to 0xBC, followed by a FILE_VERSION_ID which is equal to 1 for the current version of the Recommendation and International Standard (with other values reserved for future use, as modified in additional parts or amendments, by ITU-T or ISO/IEC). Within the payload data, JPEG XR IMAGE_HEADER( ) data structures begin with a GDI_SIGNATURE, which is a 64-bit syntax element that has the value 0x574D50484F544F00 that corresponds to "WMPHOTO" using the UTF-8 character set encoding specified in Annex D of ISO/IEC 10646, followed by a byte equal to 0.

class fileformats.image.Jxra(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Jxrs(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Jxs(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jxsc(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Jxsi(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Jxss(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Ktx(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

Currently only etcpack. It is anticipated it will be widely used by applications built on top of the OpenGL family of standards, OpenGL, OpenGL ES and WebGL, as the means of delivering texture data.

class fileformats.image.Ktx2(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Naplps(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Prs_Btif(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

TODO: Since BTIF files are an extension of TIFF 6.0, the magic numbers are exactly the same as for TIFF 6.0. The BTIF file specification does not introduce any unique magic numbers besides what's already present in TIFF 6.0. (See attached specification)

class fileformats.image.Prs_Pti(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.PwgRaster(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

class fileformats.image.Svg__Xml(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

SVG is used by Web browsers, often in conjunction with HTML; by mobile phones and digital cameras, as a format for interchange of graphical assets in desk top publishing, for industrial process visualization, display signage, and many other applications which require scalable static or interactive graphical capability.

TODO: Note that the extension ".svgz" is used as an alias for ".svg.gz" [rfc1952] i.e. octet streams of type image/svg+xml subsequently compressed with gzip.

class fileformats.image.T38(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.TiffFx(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: Image, BinaryFile

class fileformats.image.Webp(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

Applications that are used to display and process images, especially when smaller image file sizes are important.

TODO: The first 4 bytes are 0x52, 0x49, 0x46, 0x46 ('RIFF'), followed by 4 bytes for the RIFF chunk size. The next 7 bytes are 0x57, 0x45, 0x42, 0x50, 0x56, 0x50, 0x38 ('WEBPVP8').

class fileformats.image.Wmf(*fspaths: Iterable[str | Path] | str | Path | fileformats.core.FileSet, metadata: Dict[str, Any] | None = None, **load_kwargs: Any)[source]

Bases: WithMagicNumber, BinaryFile, Image

Office productivity applications; clip art applications; desktop publishing applications; some web browsers (e.g., Internet Explorer).

TODO: (little-endian DWORD 0x9AC6CDD7)