Bug fixes:
- Set PIL.ImageFile.LOAD_TRUNCATED_IMAGES = True to try to load damaged images. @davisagli (#14)
Bug fixes:
- If width and height are given, ignore the scale parameter when determining the unique id of a scale. @wesleybl (#92)
Bug fixes:
- Fix incompatibility with Pillow 10.1+.
Instead of setting
image.mode
, we callimage.convert
. This works in Pillow 9 and 10. [maurits] (#89)
New features:
- Keep scaled WEBP images in WEBP format instead of converting to JPEG. @mamico (#85)
Bug fixes:
- Fix KeyError in ScalesDict conflict resolution. @davisagli (#84)
Internal:
- Update configuration files. [plone devs] (cfffba8c)
Internal:
- Update configuration files. [plone devs] (a533099d)
Tests
- Tox: explicitly test only the
plone.scale
package. [maurits] (#50)
Bug fixes:
- Test with Python 3.11. [maurits] (#311)
- Require Python 3.7 or higher. [maurits] (#600)
New features:
- Add support for animated GIFs @reebalazs (#69)
Breaking changes:
- No longer test Plone 5.2 on 3.6 and Plone 6.0 on 3.7. [maurits] (#3637)
Bug fixes:
- Use "scale" mode as default.
This cleans up more confusion between mode and direction.
See also plone.namedfile issue 102.
Previously our definition of the
IImageScaleFactory
interface had the deprecateddirection="thumbnail"
. Other parts usedmode="contain"
by default, which does cropping, where in Plone we are used to simple scaling almost everywhere. [maurits] (#102)
Bug fixes:
- Fixed getting original data for a tile. [maurits] (#64)
Bug fixes:
- Fix to ensure that when a scale that was registered using pre_scale is later actually generated by get_or_generate, it is stored with the same uid as the placeholder info that was stored by pre_scale. This avoids an issue where the same scale was generated repeatedly. [davisagli] (#60)
New features:
- Pre scale: store non-random uid to prepare space for a scale.
You call
pre_scale
to pre-register the scale with a unique id without actually doing any scaling with Pillow. When you later call thescale
method, the scale is generated. You can still callscale
directly without first callingpre_scale
. [maurits] (#57) - Mark as plone.protect's safeWrite AnnotationStorage. Precondition for plone/plone.namedfile#117. [mamico] (#58)
Bug fixes:
- Minor cleanup: isort, black. [maurits] (#59)
Bug fixes:
- Fix cropping when the height is not limited. Create a square then. Not limited means: 65000 or larger, or zero or lower. [maurits] (#53)
- Fix cleanup of scales: only throw away outdated scales of the same field. [maurits] (#55)
Bug fixes:
- Fixed
DeprecationWarning
with Pillow 9.1.0 forANTIALIAS
. UseResampling.LANCZOS
, falling back toANTIALIAS
on older Pillows. [maurits] (#49)
Breaking changes:
- Removed deprecated
factory
argument fromscale
method. This is in theAnnotationStorage
class and theIImageScaleStorage
interface. This was already scheduled for removal inplone.scale
3.0, but was kept longer. Fixes issue 47. [maurits] (#47)
Breaking changes:
- Removed docs directory and sphinx extra. The docs were last updated in 2010, and the maybe still relevant parts already copied to the readme. [maurits] (#44)
- Removed
tests
extra, kept onlytest
extra andstorage
. Swapped packages slightly between those two extras. Forstorage
we depend onpersistent
andZODB
. [maurits] (#44) - Depend on Pillow. Originally we did not officially depend on it (or PIL) "because not everyone can install it as an egg". It seems time to grow up here. [maurits] (#44)
- Removed Python 2 support. Only Python 3.6+ supported now. Still works on Plone 5.2. [maurits] (#44)
New features:
- Add tox.ini with mxdev. Test with GitHub Actions on Plone 5.2 Py + 3.6-3.8 and Plone 6.0 + Py 3.7-3.10. [maurits] (#44)
Bug fixes:
- Resolve deprecation warning [gforcada] (#42)
Bug fixes:
- Minor packaging updates. (#1)
New features:
The
mode
argument replaces the old, now deprecated,direction
argument. The new names arecontain
orscale-crop-to-fit
instead ofdown
,cover
orscale-crop-to-fill
instead ofup
andscale
instead ofthumbnail
. [fschulze] (#29)Added
calculate_scaled_dimensions
function to calculate sizes from bare values without actually scaling an image. [fschulze]Added
MAX_PIXELS
constant set to8192*8192
to prevent memory overflow while scaling. [fschulze] (#37)
Bug fixes:
- Fix documentation of scaling modes to match it's behavior. [thet] (#39)
Bug fixes:
- reduce warnings in tests [jensens]
Bug fixes:
- Fix cleanup of image scales in py3 [pbauer]
Bug fixes:
- Fix conflict resolution code corner case. [gforcada]
Breaking changes:
- Restore scale down behaviour from 1.x series without the huge memory usage. [fschulze]
New features:
- Handle TIFF images with alpha channels. [fschulze]
New features:
- Python 3 compatibility. [dhavlik]
Bug fixes:
- Remove unused dependency. [gforcada]
Bug fixes:
- Only convert JPEG to greyscale if they actually are and not when the image has less than 256 colors. This bug was introduced in 2.1 with PR #13. [fschulze]
- Preserve color profile in scaled images. [fschulze]
New features:
- Choose an appropriate image mode in order to reduce file size. [didrix]
Bug fixes:
- Require the
six
package so we can more easily check number types. On Python 3long
has been merged intoint
. [maurits] - When getting an outdated scale, don't throw it away when there is no factory. [maurits]
- Avoid TypeErrors when looking for outdated scales. Fixes issue 12. [maurits]
- Catch KeyError when deleting non existing scale. This can happen in corner cases. Fixes issue 15. [maurits]
- Set
zip_safe=False
insetup.py
. Otherwise you cannot run the tests of the released package because the test runner does not find any tests in the egg file. Note that this is only a problem in zc.buildout 1.x: it uses unzip=False by default. zc.buildout 2.x no longer has this option and always unzips eggs. [maurits]
New:
- Assume a width or height of zero is semantically the same as None already was: Use the other dimension to scale, calculate the missing one. [jensens, thet]
- Scaled GIFs are converted to RGBA PNG images instead of converting them to JPEG. [thet, jensens]
Fixes:
- Don't scale images up for direction "down". [thet]
- Major housekeeping, code refactored in order to reduce complexicty. [jensens]
New:
- Use an adapter to lookup the actual factory for scaling. Deprecated passing the factory as named parameter along, because this had not enough flexibility: If addons want to provide alternative methods to scale (i.e. cropping), now a specific adapter can perform the work. [jensens]
Fixes:
- Minor housekeeping. [jensens]
Fixes:
- Fix KeyError in storage.AnnotationStorage._cleanup when attempting to delete the storage for the same key twice. [fulv]
New:
- Resolve conflicts raised when accessing multiple scales concurrently. [gotcha]
- Refactored scale storage. [gotcha]
- PIL thumbnail does not work for magnifying images (when scaling up). Use resize instead. [sureshvv]
- When a scale is outdated, discard all image scales that are more than a day older than the context. Refs https://dev.plone.org/ticket/13791 [maurits]
- Make sure deleting items or clearing a complete storage works. Deleting one item would often delete a linked second item, which made it hard to remove several items at once. [maurits]
- Discard old image scales if item was modified. Refs https://dev.plone.org/ticket/13791 [gforcada]
- Generate Progressive JPEG. [kroman0]
- Added a marker interface for scaled image quality. Refs http://dev.plone.org/plone/ticket/13337 [khink]
- Cropped images are now centralised vertically as well as horizontally [mattss]
- Add MANIFEST.in. [WouterVH]
- Break up scaleImage, so that its scaling-related parts can be applied to instances of PIL.Image for further processing. [witsch]
- Re-release to fix bad egg created for 1.2.1. Refs http://dev.plone.org/plone/ticket/11154 [witsch]
- Convert CMYK to RGB, allowing for web previews of print images. [tomster]
- Update package metadata. [hannosch]
- Abort if thumbnail behaviour is requested but either width or height is missing. This is nicer than confronting the caller with a PIL exception. [wichert]
- Rename the keep direction to thumbnail to make its behaviour more intuitive, but accept keep for now. [wichert]
- Only pull in the uuid distribution in Python versions before 2.5. [hannosch]
- Don't declare dependency on PIL. [davisagli]
- Add BSD license text following board decision: http://lists.plone.org/pipermail/membership/2009-August/001038.html [elro]
- Allow to use PIL's thumbnail algorithm to keep the present aspect ratio. [spamsch, witsch]
- Allow to set the quality of the resulting image scales. [witsch]
- Refactor storage adapter for image scales to be less dependent on the underlying content type. [witsch]
- Initial release [wichert]