Skip to main content

A Python library for image scaling, conversion and document thumbnail generation.

Project description

Scaler

A Python library for image scaling, conversion and document thumbnail generation.

Installation

pip install scaler-pics

Usage

from scaler-pics import Scaler, TransformOptions, InputOptions, OutputOptions, Fit, ImageDelivery

# Initialize the Scaler instance with the API key
scaler = Scaler(api_key='your_api_key')

# Define the transform options
options = TransformOptions(
    input=InputOptions(localPath='path/to/image.heic'),
    output=OutputOptions(
        type='jpeg',
        fit=Fit(width=1024, height=1024),
        imageDelivery=ImageDelivery(saveToLocalPath='path/to/output.jpg'),
        quality=0.8
    )
)

# Perform the transformation
response = scaler.transform(options)
print(response)

Get API key from Scaler

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

scaler-pics-1.0.2.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

scaler_pics-1.0.2-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

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