solidipes.loaders.image_sequence module

class solidipes.loaders.image_sequence.ImageSequence(**kwargs)[source]

Bases: Sequence, File

Sequence of images loaded with PIL

property _element_count
_load_element(n)[source]

Load a single frame

classmethod check_file_support(path)[source]

In addition to File class checks, also check if the file is a sequence of images

property image
property image_sequence
property n_frames
select_frame(frame)[source]
supported_mime_types = {'application/postscript': ['eps', 'ps'], 'image/aces': ['exr'], 'image/apng': ['apng'], 'image/avci': ['avci'], 'image/avcs': ['avcs'], 'image/avif': ['avif', 'hif'], 'image/bmp': ['bmp'], 'image/cgm': ['cgm'], 'image/dicom-rle': ['drle'], 'image/dpx': ['dpx'], 'image/emf': ['emf'], 'image/example': [], 'image/fits': ['fits', 'fit', 'fts'], 'image/g3fax': [], 'image/gif': ['gif'], 'image/heic': ['heic'], 'image/heic-sequence': ['heics'], 'image/heif': ['heif'], 'image/heif-sequence': ['heifs'], 'image/hej2k': ['hej2'], 'image/hsj2': ['hsj2'], 'image/ief': ['ief'], 'image/jls': ['jls'], 'image/jp2': ['jp2', 'jpg2'], 'image/jpeg': ['jpeg', 'jpg', 'jpe', 'jfif'], 'image/jph': ['jph'], 'image/jphc': ['jhc', 'jphc'], 'image/jpm': ['jpm', 'jpgm'], 'image/jpx': ['jpx', 'jpf'], 'image/jxl': ['jxl'], 'image/jxr': ['jxr'], 'image/jxrA': ['jxra'], 'image/jxrS': ['jxrs'], 'image/jxs': ['jxs'], 'image/jxsc': ['jxsc'], 'image/jxsi': ['jxsi'], 'image/jxss': ['jxss'], 'image/ktx': ['ktx'], 'image/ktx2': ['ktx2'], 'image/naplps': [], 'image/png': ['png'], 'image/prs.btif': ['btif', 'btf'], 'image/prs.pti': ['pti'], 'image/pwg-raster': [], 'image/svg+xml': ['svg', 'svgz'], 'image/t38': [], 'image/tiff': ['tiff', 'tif'], 'image/tiff-fx': ['tfx'], 'image/vnd.adobe.photoshop': ['psd'], 'image/vnd.airzip.accelerator.azv': ['azv'], 'image/vnd.cns.inf2': [], 'image/vnd.dece.graphic': ['uvi', 'uvvi', 'uvg', 'uvvg'], 'image/vnd.djvu': ['djvu', 'djv'], 'image/vnd.dvb.subtitle': [], 'image/vnd.dwg': ['dwg'], 'image/vnd.dxf': ['dxf'], 'image/vnd.fastbidsheet': ['fbs'], 'image/vnd.fpx': ['fpx'], 'image/vnd.fst': ['fst'], 'image/vnd.fujixerox.edmics-mmr': ['mmr'], 'image/vnd.fujixerox.edmics-rlc': ['rlc'], 'image/vnd.globalgraphics.pgb': ['PGB', 'pgb'], 'image/vnd.microsoft.icon': ['ico'], 'image/vnd.mix': [], 'image/vnd.ms-modi': ['mdi'], 'image/vnd.net-fpx': [], 'image/vnd.pco.b16': ['b16'], 'image/vnd.radiance': ['hdr', 'rgbe', 'xyze'], 'image/vnd.sealed.png': ['spng', 'spn', 's1n'], 'image/vnd.sealedmedia.softseal.gif': ['sgif', 'sgi', 's1g'], 'image/vnd.sealedmedia.softseal.jpg': ['sjpg', 'sjp', 's1j'], 'image/vnd.svf': [], 'image/vnd.tencent.tap': ['tap'], 'image/vnd.valve.source.texture': ['vtf'], 'image/vnd.wap.wbmp': ['wbmp'], 'image/vnd.xiff': ['xif'], 'image/vnd.zbrush.pcx': ['pcx'], 'image/webp': ['webp'], 'image/wmf': ['wmf'], 'image/x-canon-cr2': ['cr2'], 'image/x-canon-crw': ['crw'], 'image/x-cmu-raster': ['ras'], 'image/x-coreldraw': ['cdr'], 'image/x-coreldrawpattern': ['pat'], 'image/x-coreldrawtemplate': ['cdt'], 'image/x-corelphotopaint': ['cpt'], 'image/x-epson-erf': ['erf'], 'image/x-jg': ['art'], 'image/x-jng': ['jng'], 'image/x-nikon-nef': ['nef'], 'image/x-olympus-orf': ['orf'], 'image/x-portable-anymap': ['pnm'], 'image/x-portable-bitmap': ['pbm'], 'image/x-portable-graymap': ['pgm'], 'image/x-portable-pixmap': ['ppm'], 'image/x-rgb': ['rgb'], 'image/x-xbitmap': ['xbm'], 'image/x-xcf': ['xcf'], 'image/x-xpixmap': ['xpm'], 'image/x-xwindowdump': ['xwd']}

List of supported mime types. Override in subclasses.