Skip to main content

Professional Image and Video Scaling Library with Audio Support

Project description

PhotoScaler 🚀 (v1.0.0)

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.1.tar.gz (5.0 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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: photoscaler-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 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.1.tar.gz
Algorithm Hash digest
SHA256 9cbc84c22d0db6c168150f69c990badb4a9712eb6c0615b5e768bd2ffd63a180
MD5 aa0d401381ec055ca811b1a708a41733
BLAKE2b-256 f820cf380e98c5c46b3b423325a0373d2c1e8442c68c0b579405b9e1f859eade

See more details on using hashes here.

File details

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

File metadata

  • Download URL: photoscaler-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 845c487356d2cbffdcd55d20ae853675b3b5b55f9ebf9e6288c3976cb2bb5aa5
MD5 4dc9e9b49dde0dc506d45b2eedd9cc22
BLAKE2b-256 55f5082cfa68a7b1e9d7e1ddd235212b023c8233b64cb9331a979aa03464a257

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