Skip to main content

Professional Image and Video Scaling Library with Subprocess Support

Project description

PhotoScaler 🚀 (v1.0.6)

PhotoScaler is a professional-grade media processing library for Python. It provides high-fidelity upscaling/downscaling for both images and videos, featuring automatic audio preservation, batch processing, and advanced sharpening filters.


✨ Key Features

  • Audio Sync: Automatically extracts and merges original audio back into scaled videos using FFmpeg.
  • Smart Scaling: Uses LANCZOS4 interpolation for superior detail reconstruction.
  • Visual Enhancement: Integrated sharpening kernels to restore clarity after scaling.
  • Batch Processing: Process entire directories of images or videos by passing a folder path.
  • Aspect Ratio Guard: Optional keep_ratio setting to prevent image stretching or squashing.
  • Animation Support: Full support for animated GIFs, preserving frame sequences and timing.
  • Case-Insensitive API: Flexible parameter handling (e.g., SeeProcess or seeprocess).

🛠 Prerequisites

To use the video audio features, FFmpeg must be installed on your system.

  • Windows: Download from gyan.dev and add to your PATH.

📦 Installation

For Users (PyPI)Bashpip install photoscaler 🚀 Usage Guide1. High-End Video UpscalingScale a video to 4K while keeping the audio and adding sharpness.Pythonfrom photoscaler import scaler

scaler( file=r"C:\Media\input.mp4", mode="upscale", resolution="3840x2160", output=r"C:\Exports", SeeProcess=True, # Live terminal progress bar sharpness=True, # Apply sharpening filter keep_ratio=True, # Maintain original proportions quality=100 # Maximum output quality ) 2. Batch Processing (Folders)Process every image or video in a folder to a specific width automatically.Pythonfrom photoscaler import scaler

Processes all supported files in the directory

scaler( file=r"C:\Photos\Album", mode="upscale", resolution="1920", # Auto-calculates height SeeProcess=True, sharpness=True ) 3. Format Conversion & Quality ControlDownscale and convert a PNG to a high-quality WebP.Pythonfrom photoscaler import scaler

scaler( file="logo.png", mode="downscale", resolution="500x500", OutputType="webp", quality=90 )

🛠 Parameters

file str Path to a file or a directory for batch mode. Required

mode str Operation mode (upscale or downscale). Required

resolution str Target size (e.g., "1920x1080" or "1920"). Required

output str Directory where the output will be saved. Original Dir

OutputFileName str Custom name for the output file. scaled_...

OutputType str Change output format (e.g., "png", "mp4"). Original

SeeProcess bool Enables a real-time progress bar. False

sharpness bool Applies a 3x3 sharpening kernel. False

keep_ratio bool Locks the aspect ratio. False

quality int Output compression quality (1-100). 95

use_gpu bool Enables CUDA acceleration. False

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photoscaler-1.0.6.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

photoscaler-1.0.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file photoscaler-1.0.6.tar.gz.

File metadata

  • Download URL: photoscaler-1.0.6.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for photoscaler-1.0.6.tar.gz
Algorithm Hash digest
SHA256 a5c54e0b1c0e088e35a116772409515af3875bca96d6c404c609b5e2736c8ed1
MD5 86d3c8694425dadd6c32f0308dd14a50
BLAKE2b-256 512e626006b344733b5b829c3c00196ee554fd8234a5aaeb2d5093747475590c

See more details on using hashes here.

File details

Details for the file photoscaler-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: photoscaler-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for photoscaler-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 952f4d57f81d9d96af605e46af40d52802bdfcc9f900d1998c0d2425b93fd133
MD5 5b07fc8cb72ba5163fad20a4727bbc90
BLAKE2b-256 e9ef9f9fe6c6f0bdbe8a311fbd7144e48acd32b91f42b0bb9dbf3ef38b437687

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page