sphinx_nbexamples/__init__.py
def save_thumbnail(self, image_path):
        """Save the thumbnail image"""
        thumb_dir = os.path.join(os.path.dirname(image_path), 'thumb')
        create_dirs(thumb_dir)

        thumb_file = os.path.join(thumb_dir,
                                  '%s_thumb.png' % self.reference)
        if os.path.exists(image_path):
            logger.info('Scaling %s to thumbnail %s', image_path, thumb_file)
            self.scale_image(image_path, thumb_file, 400, 280)
        self.thumb_file = thumb_file
def save_thumbnail(self, image_path):
        """Save the thumbnail image"""
        thumb_dir = os.path.join(os.path.dirname(image_path), 'thumb')
        create_dirs(thumb_dir)

        thumb_file = os.path.join(thumb_dir,
                                  '%s_thumb.png' % self.reference)
        if os.path.exists(image_path):
            logger.info('Scaling %s to thumbnail %s', image_path, thumb_file)
            self.scale_image(image_path, thumb_file, 400, 280)
        self.thumb_file = thumb_file
Save the thumbnail image