コード例 #1
0
    def _create_thumbnail_pixbuf(self, filepath: Path):
        """
        Creates a thumbnail pixbuf from <filepath>, and returns it as a
        tuple: (pixbuf)
        """

        if ImageTools.is_image_file(filepath):
            pixbuf = ImageTools.load_pixbuf_size(filepath, self.__width, self.__height)
            return pixbuf

        return None, None
コード例 #2
0
    def _listed_contents(self, archive, files):
        if not self.__file_loading:
            return
        self.__file_loading = False

        archive_images = [
            image for image in files if ImageTools.is_image_file(Path(image))
            and not image.endswith('.pdf')
        ]

        self._sort_archive_images(archive_images)
        self.__extractor.set_files(archive_images)
        self._archive_opened(archive_images)