FabIO is a Python library for reading and writing images produced by 2D X-ray detectors. It supports over 20 file formats (e.g., EDF, Mar, Pilatus, TIFF, HDF5). Version 2025.10.0 requires Python >=3.10. Release cadence is roughly monthly, with versioning based on date (YYYY.MINOR.PATCH).
pip install fabioVerified import paths — ran on the pinned version, not inferred.
Basic read and write operations using FabIO.
Update imports to use 'fabio.<format>image' submodule pattern.
Replace 'from fabio.input import EdfInput' with 'from fabio.edfimage import EdfImage' and use the object's methods.
Wrap openimage() in a try/except to catch IOError or ValueError. Validate files offline with 'fabio -c file.edf' command-line tool.
Run 'pip install fabio' in your active Python environment.
Use a concrete subclass like 'from fabio.edfimage import EdfImage' or obtain an image via 'fabio.openimage()'.
Check the return value: 'img = fabio.openimage(filename); if img is None: raise IOError("Unsupported format")'.