7.1.8. Thumbnail

Module to implement freedesktop.org thumbnail cache https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html

class BookBrowser.Thumbnail.FreeDesktopThumbnail(cache, path)[source]

Bases: object

IMAGE_EXTENSION = '.png'
IMAGE_FORMAT = 'png'
SAMPLING = 3
__init__(cache, path)[source]

Initialize self. See help(type(self)) for accurate signature.

_delete_thumbnail(is_normal=False)[source]
_logger = <Logger BookBrowser.Thumbnail.FreeDesktopThumbnail (WARNING)>
_make_large_thumbnail()[source]
_make_normal_thumbnail()[source]
_make_png_info()[source]
_make_thumbnail(dst_path, size)[source]
_make_xxx_thumbnail(is_normal=True)[source]
classmethod add_uri(path)[source]
delete_thumbnail()[source]
has_large_thumbnail(path)[source]
has_normal_thumbnail(path)[source]
has_thumbnail(is_normal=True)[source]
large
large_path
classmethod mangle_path(path)[source]
mime_type
mtime
normal
normal_path
size
source_path
thumbnail(is_normal=True)[source]
thumbnail_path(is_normal=True)[source]
uri
class BookBrowser.Thumbnail.FreeDesktopThumbnailCache[source]

Bases: object

Class to import FreeDesktop Thumbnail Cache

LARGE_SIZE = 256
NORMAL_SIZE = 128
__getitem__(path)[source]
__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

_instance = <BookBrowser.Thumbnail.FreeDesktopThumbnailCache object>
_logger = <Logger BookBrowser.Thumbnail.FreeDesktopThumbnailCache (WARNING)>
_rlock = <unlocked _thread.RLock object owner=0 count=0>
clear_cache()[source]
large_path
large_thumbnail_path(path)[source]
normal_path
normal_thumbnail_path(path)[source]
path
thumbnail_path(path, is_normal=True)[source]