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)
Built Distribution
Close
Hashes for scaler_pics-1.0.2-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 17c11a13176fbcc1078af0158e01b71e02eb34f55ca8ba95d96a8bb92ce2df18 |
|
| MD5 | 0d279189622aa92bf211a0ec39eef9d0 |
|
| BLAKE2b-256 | d741f25ea65da6e9212ae86ef74f2e3082973e51d56a53f5424021c637c0dd5f |