Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

NOTE: This is the fork of cropresize

cropresize uses PIL to crop and resize an image as appropriate for web presentation. cropresize is a convenience package that allows image resizing without aspect ratio distortion.

API

cropresize contains one useful function, cropresize.crop_resize. The function takes three arguments:

  • image: a PIL image object

  • size: a 2-tuple of (width,height); at least one must be specified

  • exact_size: whether to scale up for smaller images

See cropresize.crop_resize.__doc__ for the function documentation. crop_resize returns the cropped and resized PIL image.

Command Line

The command line program, crop-resize, is included in this python package. The help for the program is displayed by running crop-resize with no arguments or crop-resize --help.

Future Work

cropresize is written as a convenience function to PIL as this methodology for cropping and resizing images is often desired for presentation, particularly on the web. Since the utility is in demand, the functionality should be ported upstream to PIL.

http://k0s.org/portfolio/software.html#cropresize

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cropresize2-0.1.7a.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file cropresize2-0.1.7a.tar.gz.

File metadata

  • Download URL: cropresize2-0.1.7a.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cropresize2-0.1.7a.tar.gz
Algorithm Hash digest
SHA256 6b491b2b28f435de7a460db1bfeb9d7e8bbb7fa6547d54d02d887ad906ea0b4e
MD5 237ff4263533319519e76858125ab6ce
BLAKE2b-256 a391c471a7402ff6cff128cdcb487e163e32620e5db0df338c657d8db0aa64e7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

1 file

0.1.9

1 file

0.1.8

1 file

This release

0.1.7a This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page