Skip to main content

Package provides function for rather neat image resizing (like Fill resize in Figma)

Project description

Package overview

This package is dedicated to solve problem of resizing images from one size and aspect ration to another in fancier way. This was inspired by Figma, where you can resize image using "Fill" type, so that image is not stretched.

What happenes

fill_image_resize

How to use

from fill_image_resize import resize


path = 'image.png'
desired_width = 1020
desired_height = 1000
resized_image = resize(path, desired_width, desired_height)
resized_image.save('resized_image.png')

Requirements

Pillow >= 7.0.0

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

fill-image-resize-1.1.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

fill_image_resize-1.1.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file fill-image-resize-1.1.0.tar.gz.

File metadata

  • Download URL: fill-image-resize-1.1.0.tar.gz
  • Upload date:
  • Size: 15.1 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.2 CPython/3.9.7

File hashes

Hashes for fill-image-resize-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d55ee65b544c64fdccd379a8614bed5313c28caf83b4ff2b0f657dbf89d8b3c1
MD5 b6bfd38d5371e9b05ae1c48c47bd071a
BLAKE2b-256 88db2cd13df160544207cf710bdf3047692d0827e25502a403fe9c2087dd979f

See more details on using hashes here.

File details

Details for the file fill_image_resize-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: fill_image_resize-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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.2 CPython/3.9.7

File hashes

Hashes for fill_image_resize-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb88ce6b52e0caf4f20bae670280bd07fd2b1427ddcced2b3a3b4136f0fb7cc3
MD5 6c89c1d5287812472b9e69985b4360e2
BLAKE2b-256 1c07b690a268df0d926cdfbd8738c9b7ac0a3836a0f0a0483945ff962f8037f0

See more details on using hashes here.

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