pyvista_zstd.read_thumbnail#
- pyvista_zstd.read_thumbnail(path: Path | str) bytes | None#
Return the PNG thumbnail embedded in a container, or None.
Reads only the thumbnail’s bytes and decompresses nothing. Staleness is reported by
pyvista_zstd.Reader.thumbnail_info.- Parameters:
- pathpathlib.Path | str
Path to the container.
- Returns:
- bytes | None
The PNG file contents, or None when the container has no thumbnail.
Examples
>>> import pyvista as pv >>> import pyvista_zstd >>> pyvista_zstd.write(pv.Sphere(), "sphere.pv", thumbnail=True) >>> png = pyvista_zstd.read_thumbnail("sphere.pv")