Skip to content

scaler-pics/scaler.pics-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published