Skip to main content

Returns a PIL Image object of instagram compatible aspect ratio when supplied with an image URL or an image object.

Project description

Instaresizer-0.0.3

Description

Takes in an image URL as an argument and returns PIL image object which resizes the original image to optimally fit instagram supported aspect ratio.

Usage

Installation
pip install instaresizer
Example
  1. Importing the library
#!/usr/bin/env python3

from instaresizer import instasize

  1. Usage - resizing remote image file supplied via a URL.
image_url = 'https://s3.amazonaws.com/images.seroundtable.com/30th-anniversary-of-the-world-wide-web-google-1552390014.gif'

img = instasize.resize_remote(image_url)

img.save('resized_file.png', 'PNG')
  1. Usage - resizing local image file supplied via a URL.
image = Image.open("test_image.jpeg")

img = instasize.resize_image(image)

img.save('resized_file.png', 'PNG')

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

instaresizer-0.0.3.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

instaresizer-0.0.3-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file instaresizer-0.0.3.tar.gz.

File metadata

  • Download URL: instaresizer-0.0.3.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for instaresizer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e88c2ed6031edb271267a6823d05fd669d8adff8f46a2a4a83e3914e99a01a5e
MD5 91dcd3762dead9a6ce80e7c273aacc5d
BLAKE2b-256 ec356ab9fff4f3da5330b8e189e21b96499c9c0ffb8c93efbfd4de5f0a3d8713

See more details on using hashes here.

File details

Details for the file instaresizer-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: instaresizer-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for instaresizer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8e29845a876534a5f328d744e4c5769849320def20c01d49ff2540cafb5e73d
MD5 e880dea96ada9d3596d987ef08c52fee
BLAKE2b-256 0fa120739d12fda8ad342e9d3352695364071c5003f55dcb783df22b4e790329

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