Aspose.Imaging FOSS for Python — Frequently Asked Questions
View as Markdown

Aspose.Imaging FOSS for Python — Frequently Asked Questions

Licensing & Open Source

What is the licensing model for Aspose.Imaging FOSS for Python?

Aspose.Imaging FOSS for Python is released under the MIT License. It is free to use in commercial and non-commercial projects, with no registration, API key, or license file required.

Can I use it in commercial products?

Yes. The MIT License permits use, modification, and redistribution in commercial software without restriction, as long as the original copyright notice and license text are included in any copies or substantial portions of the software.

Installation & Requirements

How do I install Aspose.Imaging FOSS for Python?

git clone https://github.com/aspose-imaging-foss/Aspose.Imaging-FOSS-for-Python.git
cd Aspose.Imaging-FOSS-for-Python
pip install -e .

The library targets Python 3.10 or later and has zero dependencies beyond the Python standard library.

Format Support

Does Aspose.Imaging FOSS for Python decode or render images?

No. The library’s scope is deliberately narrow: it detects an image’s format and reads header-level metadata (dimensions, bit depth, frame count) directly from the file header. It never decodes, renders, or manipulates pixel data. Decoding, editing, and format conversion are outside this library’s scope and require the commercial Aspose.Imaging for Python SDK.

Which image formats can it detect?

PNG/APNG, JPEG, BMP, PSD, GIF, WebP, ICO, TIFF, EMF, WMF, DICOM, DjVu, AVIF, and HEIC — 14 formats in total. An unrecognized header resolves to ImageFormat.UNKNOWN rather than raising an exception.

Does it support DICOM medical imaging files?

Yes, at the header level. probe() parses DICOM headers, extracting rows, columns, and bits allocated — no DICOM viewer or external dependency required.

API Usage

What is the main entry point for the API?

detect_format(), probe(), and probe_async() are the three module-level entry points. probe()/probe_async() return a full ImageInfo result; detect_format() returns just the ImageFormat when dimensions aren’t needed.

What happens if I probe a corrupted or truncated file?

probe() and probe_async() never raise on malformed or truncated input. They return a partial ImageInfo with whatever fields they could determine — format is set whenever the header’s format marker was recognized, even if the rest of the file is cut short.

Are width, height, bit_depth, and frame_count always populated?

No. ImageInfo exposes these as nullable properties, populated only when the detected format’s header actually carries that value. format is the one field guaranteed to be set once the header is recognized.

Is there an asynchronous version of probe()?

Yes. probe_async() mirrors probe() for asyncio applications, accepting a path, buffer, or a stream that exposes an asynchronous read(size) method such as asyncio.StreamReader.

See Also