Repository navigation
AVIF, FIT, FITS, and QOI formats not included in Nuitka build #9432
Copy link
Copy link
Closed as not planned
Labels
Description
Activity
As those are pretty new, it's probably Nuitka 4.0rc9 not having updated a list of PIL imports, but as there's a workaround I don't feel like testing Nuitka's latest source right now.
Problems with Nuitka builds should be reported directly to them. We have no control over what they do.
Yeah, sorry. I was still in the inconsistent plugins mood.
Reacted by Hugo van KemenadeExcept it turned out to be caused by a missing
Image.init()according to my testcase:# SSCCE for https://github.com/Nuitka/Nuitka/issues for missing Pillow plugins from PIL import Image Image.init() # Loads all drivers. print(Image.EXTENSION) # {'.avif': 'AVIF', '.avifs': 'AVIF', '.blp': 'BLP', '.bmp': 'BMP', '.dib': 'DIB', '.bufr': 'BUFR', '.cur': 'CUR', '.pcx': 'PCX', '.dcx': 'DCX', '.dds': 'DDS', '.ps': 'EPS', '.eps': 'EPS', '.fit': 'FITS', '.fits': 'FITS', '.fli': 'FLI', '.flc': 'FLI', '.ftc': 'FTEX', '.ftu': 'FTEX', '.gbr': 'GBR', '.gif': 'GIF', '.grib': 'GRIB', '.h5': 'HDF5', '.hdf': 'HDF5', '.png': 'PNG', '.apng': 'PNG', '.jp2': 'JPEG2000', '.j2k': 'JPEG2000', '.jpc': 'JPEG2000', '.jpf': 'JPEG2000', '.jpx': 'JPEG2000', '.j2c': 'JPEG2000', '.icns': 'ICNS', '.ico': 'ICO', '.im': 'IM', '.iim': 'IPTC', '.jfif': 'JPEG', '.jpe': 'JPEG', '.jpg': 'JPEG', '.jpeg': 'JPEG', '.mpg': 'MPEG', '.mpeg': 'MPEG', '.tif': 'TIFF', '.tiff': 'TIFF', '.mpo': 'MPO', '.msp': 'MSP', '.palm': 'PALM', '.pcd': 'PCD', '.pdf': 'PDF', '.pxr': 'PIXAR', '.pbm': 'PPM', '.pgm': 'PPM', '.ppm': 'PPM', '.pnm': 'PPM', '.pfm': 'PPM', '.psd': 'PSD', '.qoi': 'QOI', '.bw': 'SGI', '.rgb': 'SGI', '.rgba': 'SGI', '.sgi': 'SGI', '.ras': 'SUN', '.tga': 'TGA', '.icb': 'TGA', '.vda': 'TGA', '.vst': 'TGA', '.webp': 'WEBP', '.wmf': 'WMF', '.emf': 'WMF', '.xbm': 'XBM', '.xpm': 'XPM'} from venv. # From Nuitka's .exe: # {'.avif': 'AVIF', '.avifs': 'AVIF', '.blp': 'BLP', '.bmp': 'BMP', '.dib': 'DIB', '.bufr': 'BUFR', '.cur': 'CUR', '.pcx': 'PCX', '.dcx': 'DCX', '.dds': 'DDS', '.ps': 'EPS', '.eps': 'EPS', '.fit': 'FITS', '.fits': 'FITS', '.fli': 'FLI', '.flc': 'FLI', '.ftc': 'FTEX', '.ftu': 'FTEX', '.gbr': 'GBR', '.gif': 'GIF', '.grib': 'GRIB', '.h5': 'HDF5', '.hdf': 'HDF5', '.png': 'PNG', '.apng': 'PNG', '.jp2': 'JPEG2000', '.j2k': 'JPEG2000', '.jpc': 'JPEG2000', '.jpf': 'JPEG2000', '.jpx': 'JPEG2000', '.j2c': 'JPEG2000', '.icns': 'ICNS', '.ico': 'ICO', '.im': 'IM', '.iim': 'IPTC', '.jfif': 'JPEG', '.jpe': 'JPEG', '.jpg': 'JPEG', '.jpeg': 'JPEG', '.mpg': 'MPEG', '.mpeg': 'MPEG', '.tif': 'TIFF', '.tiff': 'TIFF', '.mpo': 'MPO', '.msp': 'MSP', '.palm': 'PALM', '.pcd': 'PCD', '.pdf': 'PDF', '.pxr': 'PIXAR', '.pbm': 'PPM', '.pgm': 'PPM', '.ppm': 'PPM', '.pnm': 'PPM', '.pfm': 'PPM', '.psd': 'PSD', '.qoi': 'QOI', '.bw': 'SGI', '.rgb': 'SGI', '.rgba': 'SGI', '.sgi': 'SGI', '.ras': 'SUN', '.tga': 'TGA', '.icb': 'TGA', '.vda': 'TGA', '.vst': 'TGA', '.webp': 'WEBP', '.wmf': 'WMF', '.emf': 'WMF', '.xbm': 'XBM', '.xpm': 'XPM'} # From Nuitka's .exe without using Image.init(): # {}
Strange then that JPEG etc. worked in my compiled image viewer, but not AVIF etc.
Reacted by Maciej PiekarskiNot sure if related but I couldn't get AVIF to work on an instance running
pytorch/pytorch:2.7.1-cuda12.6-cudnn9-runtime, addingImage.init()fixed it. Thanks for a hint @CTimmerman !
What did you do?
Compile my image viewer using Nuitka.
What did you expect to happen?
Support the same number of formats as when running uncompiled.
What actually happened?
4 formats missing from read and write support: AVIF, FIT, FITS, and QOI
Fortunately that can be fixed by including unused imports in main.py, but why don't the other plugins need that?
What are your OS, Python and Pillow versions?
See https://github.com/CTimmerman/tk_image_viewer (update && compile.bat) and note the difference in debug log supported format lists.