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

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
Importing the library
#!/usr/bin/env python3
from instaresizer import instasize
Usage - resizing remote image file supplied via a URL.

This is useful if the image is publicly accessible with no additional authentication requirements.

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')
Usage - resizing local image file.
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.4.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.4-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: instaresizer-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 4dcbb3326c9bcb9423bb31d2beed454de30680554fa7bc5632e8e9f38f8f7b85
MD5 4d58ed0e2e07249532b313d9d0556e58
BLAKE2b-256 b80b9bf9aaf8a9dba0b0ea301a03b553b1a220dedf357d493e89fc457d2756fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: instaresizer-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 89bb217b325cd3456aa0732da1dd703a1307657a8d4a5085edfb694eb94b4669
MD5 d578549bf1bbcebbaae5f778847ae8f9
BLAKE2b-256 d95ecd9f0710447ea1b68b7ba611df2a3d84054169e6304f2e7ed078906779e4

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