Skip to content

shadowfaxproject/thumbnail-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

thumbnail-manager

A package to generate and manage thumbnails for images.

Features:

  • Generates thumbnail for an image url
  • Supports thumbnail size customization
  • Supports caching of thumbnails

Installation:

git clone https://github.com/shadowfaxproject/thumbnail-manager.git
cd thumbnail-manager
pip install -r requirements.txt

# Add thumbnail-manager to your PYTHONPATH to make it accessible
export PYTHONPATH=$PYTHONPATH:/path/to/thumbnail-manager

Usage:

import os
from thumbnail-manager import ThumbnailManager

image_url = 'https://picsum.photos/600/200'
cache_dir = '/path/to/cache_dir'
tm = ThumbnailManager(cache_dir=cache_dir, thumbnail_size=(100, 100))
thumbnail_file = tm.generate_thumbnail(image_url=image_url)
thumbnail_file_path = os.path.join(cache_dir, thumbnail_file)
print(os.path.exists(thumbnail_file_path))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages