Skip to main content
Pre-release

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

CroppingImageField

This will resize all images to the dimensions you specify, but instead of stretching, it will scale the images and crop the overhang.

For some examples how to configure CroppingImageField and result pictures see docs/examples.txt or the Project page on http://plone.org/products/cropping-imagefield

To use the field:

from croppingimage.field import CroppingImageField

CroppingImageField(
    name = 'image',
    long_edge_size = 600,
    short_edge_size = 450,

    # use this if you don't want portrait images to scale to (450x600) (see docs/examples.txt)
    force_format = 'landscape',

    sizes= {'large'  : (600, 450),
            'medium' : (300, 225),
            'thumb'  : (125,  94),},
    widget = ImageWidget(label= "Image",)

This will create an attribute called “image” with the sizes thumb, medium, large as given.

This will be accessible as object/image, and the sizes as:

  • object/image_thumb

  • object/image_medium

  • object/image_large

trunk (2008-07-23)

  • xxx [Ingeniweb]

History for Products.croppingimage

2008-07-23 0.2-rc2

  • History.txt renamed to CHANGES to be support collective.releaser

  • removed float parsing for VERSION in config.py to make “0.2rc1” work too.

  • added a README.txt file to skins directory hoping it will make the skins directory available in the egg release too.

2008-07-23 0.2-rc1

  • added property force_format that allows to force landscape or portrait pictures. see docs/examples.txt for more information. [fRiSi]

  • more compact code example in README.txt [fRiSi]

2008-07-22 0.1

  • eggified product [fRiSi]

  • removed commented out “pdb set_trace” since archetypes svn repos has a commit hook that blocks checkins containing it [fRiSi]

  • initial import of 0.1 release to archetypes.MoreFieldsAndWidgets [fRiSi]

Metadata

Release files for Products.croppingimage 0.2rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Products.croppingimage 0.2rc2
File Size Uploaded
Products.croppingimage-0.2rc2.tar.gz 133.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Products.croppingimage 0.2rc2
File Interpreter ABI Platform
Products.croppingimage-0.2rc2-py2.4.egg Legacy Egg format - - Details

Total release size: 151.3 kB

Release files / Products.croppingimage-0.2rc2.tar.gz

Download URL Products.croppingimage-0.2rc2.tar.gz
Size 133.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d0fde0200fbac22cb63fd02e4622148730aa3e2c91381072ac236247a8f2d137
BLAKE2b-256 checksum
How to use checksums
92c34bd91b9239dc8508004c77e7305460beca3b0fb4f517567086cde4052e3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Products.croppingimage-0.2rc2-py2.4.egg

Download URL Products.croppingimage-0.2rc2-py2.4.egg
Size 17.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
cc91595a20fd0510a978822eed6e98b2d030cce368a32c99904c34b8a05bbe4b
BLAKE2b-256 checksum
How to use checksums
6c09c0fc2f01c7c25142b3f2d2b06a8f5011f7a504f4d5e0a59c45933dc55726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2rc2 This release

2 release files

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