ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

module documentation

Undocumented

Function _probe_bmp Read the dimensions stored in a BMP information header.
Function _probe_gif Read the dimensions stored in a GIF logical screen descriptor.
Function _probe_jpeg Walk the JPEG segments until a start-of-frame marker is found.
Function _probe_png Read the dimensions stored in a PNG IHDR chunk.
Function _probe_webp Read the dimensions of the lossy, lossless or extended WebP bitstream.
Function probe_image Identify a raster image and read its dimensions from the header.
Constant _BMP_HEADER Undocumented
Constant _BMP_SIGNATURE Undocumented
Constant _GIF_HEADER Undocumented
Constant _GIF_SIGNATURES Undocumented
Constant _JPEG_FILL Undocumented
Constant _JPEG_SEGMENT Undocumented
Constant _JPEG_SIGNATURE Undocumented
Constant _PNG_HEADER Undocumented
Constant _PNG_SIGNATURE Undocumented
Constant _PROBES Undocumented
Constant _SOF_MARKERS Undocumented
Constant _STANDALONE_MARKERS Undocumented
Constant _WEBP_HEADER Undocumented
Constant _WEBP_MASK Undocumented
def _probe_bmp(data: bytes) -> tuple[str, int, int] | None: (source)

Read the dimensions stored in a BMP information header.

Parameters
data:bytesRaw image content.
Returns
tuple[str, int, int] | NoneFormat name with width and height, or None when not a BMP.
def _probe_gif(data: bytes) -> tuple[str, int, int] | None: (source)

Read the dimensions stored in a GIF logical screen descriptor.

Parameters
data:bytesRaw image content.
Returns
tuple[str, int, int] | NoneFormat name with width and height, or None when not a GIF.
def _probe_jpeg(data: bytes) -> tuple[str, int, int] | None: (source)

Walk the JPEG segments until a start-of-frame marker is found.

Parameters
data:bytesRaw image content.
Returns
tuple[str, int, int] | NoneFormat name with width and height, or None when not a JPEG.
def _probe_png(data: bytes) -> tuple[str, int, int] | None: (source)

Read the dimensions stored in a PNG IHDR chunk.

Parameters
data:bytesRaw image content.
Returns
tuple[str, int, int] | NoneFormat name with width and height, or None when not a PNG.
def _probe_webp(data: bytes) -> tuple[str, int, int] | None: (source)

Read the dimensions of the lossy, lossless or extended WebP bitstream.

Parameters
data:bytesRaw image content.
Returns
tuple[str, int, int] | NoneFormat name with width and height, or None when not a WebP.
def probe_image(data: bytes) -> tuple[str, int, int] | None: (source)

Identify a raster image and read its dimensions from the header.

Parameters
data:bytesRaw image content.
Returns
tuple[str, int, int] | NoneFormat name with width and height, or None when the content is not a supported image.
_BMP_HEADER: int = (source)

Undocumented

Value
26
_BMP_SIGNATURE: bytes = (source)

Undocumented

Value
b'BM'
_GIF_HEADER: int = (source)

Undocumented

Value
10
_GIF_SIGNATURES: tuple[bytes, ...] = (source)

Undocumented

Value
(b'GIF87a', b'GIF89a')
_JPEG_FILL: int = (source)

Undocumented

Value
255
_JPEG_SEGMENT: int = (source)

Undocumented

Value
9
_JPEG_SIGNATURE: bytes = (source)

Undocumented

Value
b'\xff\xd8'
_PNG_HEADER: int = (source)

Undocumented

Value
24
_PNG_SIGNATURE: bytes = (source)

Undocumented

Value
b'''\x89PNG\r
\x1a
'''
_SOF_MARKERS = (source)

Undocumented

Value
frozenset(set([192, 193, 194, 195, 197, 198, 199, 201, 202, 203, 205, 206, 207])↵
)
_STANDALONE_MARKERS = (source)

Undocumented

Value
frozenset(set([1, 255, *range(208, 218)]))
_WEBP_HEADER: int = (source)

Undocumented

Value
30
_WEBP_MASK: int = (source)

Undocumented

Value
16383