plone.app.imagecropping


Nameplone.app.imagecropping JSON
Version 3.0.2 PyPI version JSON
download
home_pagehttps://github.com/collective/plone.app.imagecropping
SummaryCrops Images in Plone manually using cropper JS library
upload_time2023-10-09 12:21:45
maintainer
docs_urlNone
authorPlone Collective
requires_python>=3.8
licenseGPLv2
keywords plone image crop
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://github.com/collective/plone.app.imagecropping/workflows/tests/badge.svg
    :target: https://github.com/collective/plone.app.imagecropping/actions?query=workflow%3Atests

.. image:: https://coveralls.io/repos/collective/plone.app.imagecropping/badge.png
    :target: https://coveralls.io/r/collective/plone.app.imagecropping

.. contents::


Why do I need this?
===================

Automatic cropping is already possible, `plone.namedfile`_ does already handle this via the ``mode`` parameter::

  <img tal:define="scales context/@@images"
       tal:replace="structure python: scales.tag('image',
                    width=1200, height=800, mode='contain')"
       />

However it only crops from the top/center of the image,
so in some occasions this is not what you want.

``plone.app.imagecropping`` allows you to select the cropping area manually for each available image scale using the `cropper`_  Javascript library

.. _`plone.namedfile`: https://pypi.org/project/plone.namedfile/
.. _`cropper`: https://github.com/fengyuanchen/cropper


How it works
============

There is a view @@croppingeditor available for every content type implementing ``IImageCroppingMarker`` via an object action. There are specific markers for Archetypes and Dexterity based types:

- ``plone.app.imagecropping.dx.IImageCroppingDX``
- ``plone.app.imagecropping.at.IImageCroppingAT``

The interfaces are implemented by default for Dexterity based ``plone.app.contenttypes`` (Plone 5 or Plone 4.x as addon) ``Image``.
``Products.ATContentTypes`` (Plone 4.x) implements it on``ATImage`` and ``ATNewsItem``.

There is also a Dexterity behavior called ``Enable Image Cropping`` which can be applied on custom content types containing at least one image.

The editor view has a tabbed navigation on the top and two columns:

- Image fields on tabbed navigation.
- Image scales column on left
- Cropping editor column on right.

The aspect ratio for the cropping area in the editor is automatically set to the image scale selected by the user.

.. image:: https://raw.github.com/collective/plone.app.imagecropping/master/docs/editor.png

The image stored for this scale gets replaced with the cropped and scaled version.
This way you can access them as you're used to. For example::

  <img tal:replace="structure context/@@images/image/mini" />

This also enables support for richtext editors such as TinyMCE to insert cropped scales into a textfield.


Automatic cropping behavior
---------------------------

You can use ``mode='contain'`` for autocropped scales as usual.
This package overrides the ``mode`` and delivers the cropped scale if it is available.


Load editor as overlay
----------------------

The editor can also be loaded as an overlay anywhere.
Just place a link to the ``@@croppingeditor`` url of an image (``<image_base_url>/@@croppingeditor``) and add some javascript. For example::

    (function($) {
        $(function() {
            $("a[href$='@@croppingeditor']").prepOverlay({
                subtype:'ajax',
                formselector:'#coords',
                closeselector:"input[name='form.button.Cancel']"
            })

            $(document).bind("formOverlayLoadSuccess", function() {
                imagecropping = new ImageCropping();
                imagecropping.init_editor();
            })
        })
    })(jQuery);

TODO: Show how to use with mockup/patterns.

Configuration
-------------

At ``Plone Site Setup`` under ``Content`` there is a new setting ``Image Cropping``.
There you can limit the scales to be shown in the cropping editor.
By default all scales are shown.

You can also set those values in the profile of your (policy)product using
``plone.app.registry`` mechanism (file ``registry.xml``).


Further Information
===================

History
-------

There has been a need for cropping for a long time and there are lots of addons around that have different ways to achieve this.

There is `plip #10174`_ asking for adding image cropping to plone core which recently got rejected by the FWT.
The cropping functionality should go into an addon first that also work for dexterity and can be pliped into core.

.. _`plip #10174`: https://dev.plone.org/plone/ticket/10174

This package aims to be THE cropping solution for plone that 'just works TM'.


Design decisions
----------------

* make this package as minimally invasive as possible

  - therefore we store the cropped image immediately, so ``plone.namedfile``
    traverser doesn't need to care about cropping

  - users can access cropped images the same way as the access scales
    (so it works in richtext editors too)

* support archetypes and dexterity content

* a cropped image gets stored instead of the scaled image.
  if you want back the uncropped image scale you'll need to remove the cropped version
  in the editor


Information about changes from version 1.x to 2.0
-------------------------------------------------

- Plone 5.1 only.
- New js library `cropper`_.
- Complete Javascript rewrite using patterns.
- New editor layout.
- Save/Remove using Ajax.

Information about changes from version 0.1 to 1.0
-------------------------------------------------

The marker interface for archetypes changed from
``plone.app.imagecropping.interfaces.IImageCropping`` to
``plone.app.imagecropping.at.IImageCroppingAT``.

The marker interface for dexterity based types changed from
``plone.app.imagecropping.browser.scaling.interfaces.IImageCroppingScale`` to
``plone.app.imagecropping.dx.IImageCroppingDX``.

The generic base interface is now
``plone.app.imagecropping.interfaces.IImageCroppingMarker``.
Do not use it directly on your, but use the marker to bind view or other adapters to image-cropping enabled types.


Possible extensions / changes for the future
--------------------------------------------

* allow to mark scales as `auto-croppable` in the imaging controlpanel.
  this enables cropped scales w/o manually defining the cropping area but would require some changes in Plone
  (extend traverser, change controlpanel)

* see also the `issue tracker <https://github.com/collective/plone.app.imagecropping/issues>`_


.. Note: place names and roles of the people who contribute to this package
   in this file, one to a line, like so:

- Peter Mathis (petschki)
- Joscha Krutzki (joka)
- Harald Frießnegger (fRiSi)
- Martijn Zweistra (themask96)
- Daniel Widerin (saily)
- Wolfgang Thomas (pysailor)
- Héctor Velarde (hvelarde)
- Tom Gross (tom_gross)
- Jens W. Klein (jensens)
- Benjamin Stefaner (benniboy)
- Peter Holzer (agitator)

Credits
-------

The basic concept of ``plone.app.imagecropping`` has already been implemented in `Yiorgis's branch of plone.app.imaging`_

.. _`Yiorgis's branch of plone.app.imaging`: https://github.com/plone/plone.app.imaging/tree/ggozad-cropping

The library `cropper <https://github.com/fengyuanchen/cropper>`_ by Fengyuan Chen was published under MIT License and is used since plone.app.imagecropping Version 2.0 for the JS part to select a croppig area.


Source Code
-----------

If you want to help with the development (improvement, update, bug-fixing, ...)
of ``plone.app.imagecropping`` this is a great idea!

The code is located in the
`github collective <https://github.com/collective/plone.app.imagecropping>`_.

You can clone it and send a pull request or `get access to the github-collective
<https://collective.github.com/>`_ and work directly on a branch of the project.


Changelog
=========

.. You should *NOT* be adding new change log entries to this file.
   You should create a file in the news directory instead.
   For helpful instructions, please see:
   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst

.. towncrier release notes start

3.0.2 (2023-10-09)
------------------

Bug fixes:


- Packaging updates: fix old imports and update resources.
  [petschki] (#143)
- Fix recreation of `image_scale` catalog metadata and update hashkey after
  changing cropping information.
  [petschki, mrTango] (#144)
- Fix `plone.imagecropping` behavior registration with a GenericSetup profile
  and remove `zcml` Interface/Class registration.
  [petschki] (#145)
- Update catalog metadata when removing cropping info.
  [petschki] (#146)
- Upgrade dependencies.
  [petschki] (#148)


3.0.1 (2023-07-07)
------------------

Bug fixes:


- Update resources.
  [petschki] (#0)


- Make sure the hash key changes after cropping an image.
  [mathias.leimgruber]


Internal:


- Update configuration files.
  [plone devs] (c1677eef)


3.0.0 (2022-10-25)
------------------

- Fix bug in croppingarea visibility.
  [petschki]


3.0.0a1 (2022-10-05)
--------------------

BREAKING CHANGES:

- Plone 6 only.
- Removed Archetypes support.
- ES6 resources with Module Federation integration
- moved from ``cropper`` to ``cropperjs`` library
  [petschki]


2.2.2 (2020-03-11)
------------------

- Avoid error when scale is not defined : #101
  [laulaz]

- Hide upgrade profiles from Plone add-on control panel.
  [rpatterson]


2.2.1 (2019-07-17)
------------------

- Add missing french translations
  [mpeeters]


2.2.0 (2019-04-24)
------------------

- Fix bug when there is an 'images' folder inside context : #96
  [laulaz]

- Fix Python 3 and Plone 5.2 compatibility
  [cillianderoiste]


2.1.0 (2018-07-03)
------------------

- Fix ``ZeroDivisionError`` when calculating the ``aspect_ratio`` for image sizes with one dimension set to ``0``.
  [thet]

- Add Italian translations.
  [cekk]

- Fix i18n domain for cropping action button
  [cekk]

- Fix Archetypes compatibility.
  [davisagli, thet]


2.0.1 (2017-02-27)
------------------

- Register resources according to Plone best practices.
  [thet]


2.0 (2016-11-24)
----------------

- Load plone_app_imagecropping bundle only for logged in users.
  [agitator]

- Updated styles
  Removed unused settings
  [agitator]

- Depend on Products.CMFPlone instead of Plone (no Archetypes by default).
  Fix conditional zcml.
  [jensens]


2.0b6 (2016-11-18)
------------------

- Add Spanish translation
  [erral]

2.0b5 (2016-11-06)
------------------

- Align editor template layout to Plone standards and place it within ``content-core`` macros.
  [thet]

- Restrict image in navigation tab to not exceed the tabs size.
  [thet]


2.0b4 (2016-07-13)
------------------

- Fix: Scales got lost after content with image was modified.
  This is solved by using the new scale factories from ``plone.scale``/``plone.namedfile``.
  Needs plone.namedfile 4.0+ and plone.scale 1.5+.
  [jensens]


2.0b3 (2016-04-29)
------------------

- Fix: Enable accidentally disabled JS bundle in resource registry.
  [jensens]


2.0b2 (2016-04-01)
------------------

- Give IImageCroppingBehavior a shortname.
  [jensens]

- Fix: Make croppingeditor play nice with pat-modal.
  [jensens]


2.0b1 (2016-03-29)
------------------

- Run i18ndude and translated new/missing strings to German.
  [jensens]

- Use more modern cropper Javascript library, kick out JCrop and rewrite all JS.
  It uses patterns now to initialize the cropper and image selections.
  [jensens]

- Code refactoring and big overhaul to make it work with Plone 5 (only) and the new JS.
  [jensens]

- Housekeeping: upgrades at one place, zca decorators, travis caching
  [jensens]

- Added more Dutch translations.
  [maurits]

- Added French translations.
  [laulaz]


1.3 (2015-12-10)
----------------

- introduce Changed/Removed events after editing cropping information
  [petschki]

- remove initial content scrolling (aka location.hash)
  [petschki]

- Use "application/javascript" media type instead of the obsolete "text/javascript".
  [hvelarde]

- fix direction='down' handling. Deliver cropped scale if we have one.
  [petschki]

- Purge proxy caches if needed on crop.
  [alecm]

- Fix issue with crops disappearing for non-blob images (e.g. ATNewsItem images)
  [alecm]

- Refactor upgrade step to reduce memory consumption and avoid restarts on instances running with supervisor's memmon.
  [hvelarde]

1.2 (2014-10-15)
----------------

- Add Finnish localization
  [datakurre]

- Fix Chameleon compatibility
  [datakurre]

- Remove hard dependency on plone.app.contenttypes to avoid compatibility
  issues with Plone 4.2 (fixes `#57`_).
  [hvelarde]

- Update package dependencies.
  [hvelarde]

- fix error with copy & paste for dx image types #52
  [pysailor]

- do not include testing.zcml automatically and use the behavior for the
  testing-dx-type.

  ATTENTION: we no longer provide the cropping maker interface for
  ``plone.dexterity.content.DexterityContent`` automatically, please use
  ``plone.app.imagecropping.behaviors.IImageCroppingBehavior`` to enable
  cropping for your dexterity types.
  [fRiSi]

1.1 (2014-09-13)
----------------

- scroll to selected scale in middle column after save.
  [jensens]

- use field names (not ids) in editor view. Slightly better style now.
  [jensens]

- add upgrade step for sane migration from 0.1 to 1.0
  [fRiSi]

1.0 (2014-09-05)
----------------

- fixed jcrop image to not scale wrong (!).
  [jensens]

- better initial selection for cropping, also mark scales in left column
  cropped/ uncropped and show uncropped in its default appearance.
  [jensens]

- Fix: Removed registration of Traverse for dexterity types since its
  base class does not support dexterity either.
  [jensens]

- Added subscriber to recreate all scales on copied objects.
  [saily, jensens]

- fixed some glitches in JCrop init process.
  [jensens]

- added dexterity behavior for image cropping.
  [benniboy]

- Major cleanup and split up code and interfaces into Dexterity and Archetypes.
  Also renamed/ moved Interfaces to be used as markers! Attention, in custom
  code minor changes are needed in order to point to the correct interfaces.
  see README for details.
  Also removed some superfluous/unused ``interface=`` passes to methods of
  ``IImageCroppingUtils``.
  [jensens]

- Update Jcrop to version 0.9.12.
  [hvelarde]

- Use ``plone.app.robotframework`` instead of writing all keywords from
  scratch. This brings us autologin support for faster robot tests. Rewrite
  tests to test scenarios.
  [saily]

- Drop Plone 4.1 support and tests.
  [saily]

- Cleanup code, align to all coding conventions for Plone.
  Pep8, Flake8, pep3101, sort imports, remove grouped imports, ...
  [saily]

- Cleanup/refactor javascript code, don't define global variables.
  [saily]

- Add coveralls, code-analysis and update travis configuration.
  [saily]

- Check for plone.namedfile not Dexterity. It can be used separately.
  *If plone.namedfile is used it needs to be at least version 2.0.1*
  [tomgross]

- ``@@croppingeditor`` now displays a message to add croppable scales
  in the controlpanel if there are no croppable scales to show.
  (previously this caused a `SiteError`)
  [fRiSi]

- Rename ``imagecropping_keywords.txt`` to ``keywords.robot`` to allow simple
  reusage in ``plone.app.robotframework``.
  [saily]

- pin zc.buildout=2.1.1 for travis-ci bootstrap
  [petschki]

- Added Russian translations
  [bogdangi]

- Prevent fieldname losing for for current field
  [bogdangi]

- Fixed #21 (cropping was reset on modifying image)
  [tomgross, fRiSi]

- Only test Plone 4.2 and 4.3 with Python 2.7 on Travis-CI
  [tomgross]

0.1rc2 (2013-05-03)
-------------------

- Include styles for authenticated users only.
  [saily]

- Make tests work in Plone 4.1
  [saily]

- Rename *acceptance* to *robot* to align new
  ``plone.app.robotframework`` guidelines.
  [saily]

- Pin ``plone.app.testing`` to make Plone 4.1 tests work.
  [saily]

- Use correct dependency for plone.app.testing with extra ``[robot]``.
  [saily]

- Add cropping ui-tests using robotframework
  [saily]

- Update ``bootstrap.py`` to work with ``zc.buildout`` 2.0
  [saily]

- Implemented #11 - Mark image scales as "croppable"
  [jensens]

- Added tests for control panel and registry
- Added Spanish and Brazilian Portuguese translations
  [hvelarde]

- Small documentation update
  [saily]


0.1rc1 (2013-03-11)
-------------------

- add support for multiple image fields
- refactored javascript includes so the editor can be loaded as overlay
- fixed JS error when editor is invisible (ie editor is loaded in an overlay)
- fixed edit/remove actions when editor is loaded as overlay
- make editor view more convenient (disable columns)
- update documentation
  [petschki]

0.1b1 (2013-03-03)
------------------

- Made cropping work in dexterity-only sites
  [pysailor]

- Add travis integration
  [saily]


0.1a2 (2012-11-10)
------------------

- fix tests
- add test setups for Plone 4.1-4.3
- Products.CMFPlone dependency. Right now we only support Plone >= 4.1
- make dexterity support optional
  [petschki]


0.1a1 (2012-11-05)
------------------

- public alpha release
  [petschki]
- Package created using templer
  [fRiSi]

.. _`#57`: https://github.com/collective/collective.cover/issues/57

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/collective/plone.app.imagecropping",
    "name": "plone.app.imagecropping",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "plone image crop",
    "author": "Plone Collective",
    "author_email": "plone-developers@lists.sourceforge.net",
    "download_url": "https://files.pythonhosted.org/packages/c4/41/1a6b59048995bd197d3757a9ea3797a218221d3bdc886984cace92945d8e/plone.app.imagecropping-3.0.2.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/collective/plone.app.imagecropping/workflows/tests/badge.svg\n    :target: https://github.com/collective/plone.app.imagecropping/actions?query=workflow%3Atests\n\n.. image:: https://coveralls.io/repos/collective/plone.app.imagecropping/badge.png\n    :target: https://coveralls.io/r/collective/plone.app.imagecropping\n\n.. contents::\n\n\nWhy do I need this?\n===================\n\nAutomatic cropping is already possible, `plone.namedfile`_ does already handle this via the ``mode`` parameter::\n\n  <img tal:define=\"scales context/@@images\"\n       tal:replace=\"structure python: scales.tag('image',\n                    width=1200, height=800, mode='contain')\"\n       />\n\nHowever it only crops from the top/center of the image,\nso in some occasions this is not what you want.\n\n``plone.app.imagecropping`` allows you to select the cropping area manually for each available image scale using the `cropper`_  Javascript library\n\n.. _`plone.namedfile`: https://pypi.org/project/plone.namedfile/\n.. _`cropper`: https://github.com/fengyuanchen/cropper\n\n\nHow it works\n============\n\nThere is a view @@croppingeditor available for every content type implementing ``IImageCroppingMarker`` via an object action. There are specific markers for Archetypes and Dexterity based types:\n\n- ``plone.app.imagecropping.dx.IImageCroppingDX``\n- ``plone.app.imagecropping.at.IImageCroppingAT``\n\nThe interfaces are implemented by default for Dexterity based ``plone.app.contenttypes`` (Plone 5 or Plone 4.x as addon) ``Image``.\n``Products.ATContentTypes`` (Plone 4.x) implements it on``ATImage`` and ``ATNewsItem``.\n\nThere is also a Dexterity behavior called ``Enable Image Cropping`` which can be applied on custom content types containing at least one image.\n\nThe editor view has a tabbed navigation on the top and two columns:\n\n- Image fields on tabbed navigation.\n- Image scales column on left\n- Cropping editor column on right.\n\nThe aspect ratio for the cropping area in the editor is automatically set to the image scale selected by the user.\n\n.. image:: https://raw.github.com/collective/plone.app.imagecropping/master/docs/editor.png\n\nThe image stored for this scale gets replaced with the cropped and scaled version.\nThis way you can access them as you're used to. For example::\n\n  <img tal:replace=\"structure context/@@images/image/mini\" />\n\nThis also enables support for richtext editors such as TinyMCE to insert cropped scales into a textfield.\n\n\nAutomatic cropping behavior\n---------------------------\n\nYou can use ``mode='contain'`` for autocropped scales as usual.\nThis package overrides the ``mode`` and delivers the cropped scale if it is available.\n\n\nLoad editor as overlay\n----------------------\n\nThe editor can also be loaded as an overlay anywhere.\nJust place a link to the ``@@croppingeditor`` url of an image (``<image_base_url>/@@croppingeditor``) and add some javascript. For example::\n\n    (function($) {\n        $(function() {\n            $(\"a[href$='@@croppingeditor']\").prepOverlay({\n                subtype:'ajax',\n                formselector:'#coords',\n                closeselector:\"input[name='form.button.Cancel']\"\n            })\n\n            $(document).bind(\"formOverlayLoadSuccess\", function() {\n                imagecropping = new ImageCropping();\n                imagecropping.init_editor();\n            })\n        })\n    })(jQuery);\n\nTODO: Show how to use with mockup/patterns.\n\nConfiguration\n-------------\n\nAt ``Plone Site Setup`` under ``Content`` there is a new setting ``Image Cropping``.\nThere you can limit the scales to be shown in the cropping editor.\nBy default all scales are shown.\n\nYou can also set those values in the profile of your (policy)product using\n``plone.app.registry`` mechanism (file ``registry.xml``).\n\n\nFurther Information\n===================\n\nHistory\n-------\n\nThere has been a need for cropping for a long time and there are lots of addons around that have different ways to achieve this.\n\nThere is `plip #10174`_ asking for adding image cropping to plone core which recently got rejected by the FWT.\nThe cropping functionality should go into an addon first that also work for dexterity and can be pliped into core.\n\n.. _`plip #10174`: https://dev.plone.org/plone/ticket/10174\n\nThis package aims to be THE cropping solution for plone that 'just works TM'.\n\n\nDesign decisions\n----------------\n\n* make this package as minimally invasive as possible\n\n  - therefore we store the cropped image immediately, so ``plone.namedfile``\n    traverser doesn't need to care about cropping\n\n  - users can access cropped images the same way as the access scales\n    (so it works in richtext editors too)\n\n* support archetypes and dexterity content\n\n* a cropped image gets stored instead of the scaled image.\n  if you want back the uncropped image scale you'll need to remove the cropped version\n  in the editor\n\n\nInformation about changes from version 1.x to 2.0\n-------------------------------------------------\n\n- Plone 5.1 only.\n- New js library `cropper`_.\n- Complete Javascript rewrite using patterns.\n- New editor layout.\n- Save/Remove using Ajax.\n\nInformation about changes from version 0.1 to 1.0\n-------------------------------------------------\n\nThe marker interface for archetypes changed from\n``plone.app.imagecropping.interfaces.IImageCropping`` to\n``plone.app.imagecropping.at.IImageCroppingAT``.\n\nThe marker interface for dexterity based types changed from\n``plone.app.imagecropping.browser.scaling.interfaces.IImageCroppingScale`` to\n``plone.app.imagecropping.dx.IImageCroppingDX``.\n\nThe generic base interface is now\n``plone.app.imagecropping.interfaces.IImageCroppingMarker``.\nDo not use it directly on your, but use the marker to bind view or other adapters to image-cropping enabled types.\n\n\nPossible extensions / changes for the future\n--------------------------------------------\n\n* allow to mark scales as `auto-croppable` in the imaging controlpanel.\n  this enables cropped scales w/o manually defining the cropping area but would require some changes in Plone\n  (extend traverser, change controlpanel)\n\n* see also the `issue tracker <https://github.com/collective/plone.app.imagecropping/issues>`_\n\n\n.. Note: place names and roles of the people who contribute to this package\n   in this file, one to a line, like so:\n\n- Peter Mathis (petschki)\n- Joscha Krutzki (joka)\n- Harald Frie\u00dfnegger (fRiSi)\n- Martijn Zweistra (themask96)\n- Daniel Widerin (saily)\n- Wolfgang Thomas (pysailor)\n- H\u00e9ctor Velarde (hvelarde)\n- Tom Gross (tom_gross)\n- Jens W. Klein (jensens)\n- Benjamin Stefaner (benniboy)\n- Peter Holzer (agitator)\n\nCredits\n-------\n\nThe basic concept of ``plone.app.imagecropping`` has already been implemented in `Yiorgis's branch of plone.app.imaging`_\n\n.. _`Yiorgis's branch of plone.app.imaging`: https://github.com/plone/plone.app.imaging/tree/ggozad-cropping\n\nThe library `cropper <https://github.com/fengyuanchen/cropper>`_ by Fengyuan Chen was published under MIT License and is used since plone.app.imagecropping Version 2.0 for the JS part to select a croppig area.\n\n\nSource Code\n-----------\n\nIf you want to help with the development (improvement, update, bug-fixing, ...)\nof ``plone.app.imagecropping`` this is a great idea!\n\nThe code is located in the\n`github collective <https://github.com/collective/plone.app.imagecropping>`_.\n\nYou can clone it and send a pull request or `get access to the github-collective\n<https://collective.github.com/>`_ and work directly on a branch of the project.\n\n\nChangelog\n=========\n\n.. You should *NOT* be adding new change log entries to this file.\n   You should create a file in the news directory instead.\n   For helpful instructions, please see:\n   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n\n.. towncrier release notes start\n\n3.0.2 (2023-10-09)\n------------------\n\nBug fixes:\n\n\n- Packaging updates: fix old imports and update resources.\n  [petschki] (#143)\n- Fix recreation of `image_scale` catalog metadata and update hashkey after\n  changing cropping information.\n  [petschki, mrTango] (#144)\n- Fix `plone.imagecropping` behavior registration with a GenericSetup profile\n  and remove `zcml` Interface/Class registration.\n  [petschki] (#145)\n- Update catalog metadata when removing cropping info.\n  [petschki] (#146)\n- Upgrade dependencies.\n  [petschki] (#148)\n\n\n3.0.1 (2023-07-07)\n------------------\n\nBug fixes:\n\n\n- Update resources.\n  [petschki] (#0)\n\n\n- Make sure the hash key changes after cropping an image.\n  [mathias.leimgruber]\n\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (c1677eef)\n\n\n3.0.0 (2022-10-25)\n------------------\n\n- Fix bug in croppingarea visibility.\n  [petschki]\n\n\n3.0.0a1 (2022-10-05)\n--------------------\n\nBREAKING CHANGES:\n\n- Plone 6 only.\n- Removed Archetypes support.\n- ES6 resources with Module Federation integration\n- moved from ``cropper`` to ``cropperjs`` library\n  [petschki]\n\n\n2.2.2 (2020-03-11)\n------------------\n\n- Avoid error when scale is not defined : #101\n  [laulaz]\n\n- Hide upgrade profiles from Plone add-on control panel.\n  [rpatterson]\n\n\n2.2.1 (2019-07-17)\n------------------\n\n- Add missing french translations\n  [mpeeters]\n\n\n2.2.0 (2019-04-24)\n------------------\n\n- Fix bug when there is an 'images' folder inside context : #96\n  [laulaz]\n\n- Fix Python 3 and Plone 5.2 compatibility\n  [cillianderoiste]\n\n\n2.1.0 (2018-07-03)\n------------------\n\n- Fix ``ZeroDivisionError`` when calculating the ``aspect_ratio`` for image sizes with one dimension set to ``0``.\n  [thet]\n\n- Add Italian translations.\n  [cekk]\n\n- Fix i18n domain for cropping action button\n  [cekk]\n\n- Fix Archetypes compatibility.\n  [davisagli, thet]\n\n\n2.0.1 (2017-02-27)\n------------------\n\n- Register resources according to Plone best practices.\n  [thet]\n\n\n2.0 (2016-11-24)\n----------------\n\n- Load plone_app_imagecropping bundle only for logged in users.\n  [agitator]\n\n- Updated styles\n  Removed unused settings\n  [agitator]\n\n- Depend on Products.CMFPlone instead of Plone (no Archetypes by default).\n  Fix conditional zcml.\n  [jensens]\n\n\n2.0b6 (2016-11-18)\n------------------\n\n- Add Spanish translation\n  [erral]\n\n2.0b5 (2016-11-06)\n------------------\n\n- Align editor template layout to Plone standards and place it within ``content-core`` macros.\n  [thet]\n\n- Restrict image in navigation tab to not exceed the tabs size.\n  [thet]\n\n\n2.0b4 (2016-07-13)\n------------------\n\n- Fix: Scales got lost after content with image was modified.\n  This is solved by using the new scale factories from ``plone.scale``/``plone.namedfile``.\n  Needs plone.namedfile 4.0+ and plone.scale 1.5+.\n  [jensens]\n\n\n2.0b3 (2016-04-29)\n------------------\n\n- Fix: Enable accidentally disabled JS bundle in resource registry.\n  [jensens]\n\n\n2.0b2 (2016-04-01)\n------------------\n\n- Give IImageCroppingBehavior a shortname.\n  [jensens]\n\n- Fix: Make croppingeditor play nice with pat-modal.\n  [jensens]\n\n\n2.0b1 (2016-03-29)\n------------------\n\n- Run i18ndude and translated new/missing strings to German.\n  [jensens]\n\n- Use more modern cropper Javascript library, kick out JCrop and rewrite all JS.\n  It uses patterns now to initialize the cropper and image selections.\n  [jensens]\n\n- Code refactoring and big overhaul to make it work with Plone 5 (only) and the new JS.\n  [jensens]\n\n- Housekeeping: upgrades at one place, zca decorators, travis caching\n  [jensens]\n\n- Added more Dutch translations.\n  [maurits]\n\n- Added French translations.\n  [laulaz]\n\n\n1.3 (2015-12-10)\n----------------\n\n- introduce Changed/Removed events after editing cropping information\n  [petschki]\n\n- remove initial content scrolling (aka location.hash)\n  [petschki]\n\n- Use \"application/javascript\" media type instead of the obsolete \"text/javascript\".\n  [hvelarde]\n\n- fix direction='down' handling. Deliver cropped scale if we have one.\n  [petschki]\n\n- Purge proxy caches if needed on crop.\n  [alecm]\n\n- Fix issue with crops disappearing for non-blob images (e.g. ATNewsItem images)\n  [alecm]\n\n- Refactor upgrade step to reduce memory consumption and avoid restarts on instances running with supervisor's memmon.\n  [hvelarde]\n\n1.2 (2014-10-15)\n----------------\n\n- Add Finnish localization\n  [datakurre]\n\n- Fix Chameleon compatibility\n  [datakurre]\n\n- Remove hard dependency on plone.app.contenttypes to avoid compatibility\n  issues with Plone 4.2 (fixes `#57`_).\n  [hvelarde]\n\n- Update package dependencies.\n  [hvelarde]\n\n- fix error with copy & paste for dx image types #52\n  [pysailor]\n\n- do not include testing.zcml automatically and use the behavior for the\n  testing-dx-type.\n\n  ATTENTION: we no longer provide the cropping maker interface for\n  ``plone.dexterity.content.DexterityContent`` automatically, please use\n  ``plone.app.imagecropping.behaviors.IImageCroppingBehavior`` to enable\n  cropping for your dexterity types.\n  [fRiSi]\n\n1.1 (2014-09-13)\n----------------\n\n- scroll to selected scale in middle column after save.\n  [jensens]\n\n- use field names (not ids) in editor view. Slightly better style now.\n  [jensens]\n\n- add upgrade step for sane migration from 0.1 to 1.0\n  [fRiSi]\n\n1.0 (2014-09-05)\n----------------\n\n- fixed jcrop image to not scale wrong (!).\n  [jensens]\n\n- better initial selection for cropping, also mark scales in left column\n  cropped/ uncropped and show uncropped in its default appearance.\n  [jensens]\n\n- Fix: Removed registration of Traverse for dexterity types since its\n  base class does not support dexterity either.\n  [jensens]\n\n- Added subscriber to recreate all scales on copied objects.\n  [saily, jensens]\n\n- fixed some glitches in JCrop init process.\n  [jensens]\n\n- added dexterity behavior for image cropping.\n  [benniboy]\n\n- Major cleanup and split up code and interfaces into Dexterity and Archetypes.\n  Also renamed/ moved Interfaces to be used as markers! Attention, in custom\n  code minor changes are needed in order to point to the correct interfaces.\n  see README for details.\n  Also removed some superfluous/unused ``interface=`` passes to methods of\n  ``IImageCroppingUtils``.\n  [jensens]\n\n- Update Jcrop to version 0.9.12.\n  [hvelarde]\n\n- Use ``plone.app.robotframework`` instead of writing all keywords from\n  scratch. This brings us autologin support for faster robot tests. Rewrite\n  tests to test scenarios.\n  [saily]\n\n- Drop Plone 4.1 support and tests.\n  [saily]\n\n- Cleanup code, align to all coding conventions for Plone.\n  Pep8, Flake8, pep3101, sort imports, remove grouped imports, ...\n  [saily]\n\n- Cleanup/refactor javascript code, don't define global variables.\n  [saily]\n\n- Add coveralls, code-analysis and update travis configuration.\n  [saily]\n\n- Check for plone.namedfile not Dexterity. It can be used separately.\n  *If plone.namedfile is used it needs to be at least version 2.0.1*\n  [tomgross]\n\n- ``@@croppingeditor`` now displays a message to add croppable scales\n  in the controlpanel if there are no croppable scales to show.\n  (previously this caused a `SiteError`)\n  [fRiSi]\n\n- Rename ``imagecropping_keywords.txt`` to ``keywords.robot`` to allow simple\n  reusage in ``plone.app.robotframework``.\n  [saily]\n\n- pin zc.buildout=2.1.1 for travis-ci bootstrap\n  [petschki]\n\n- Added Russian translations\n  [bogdangi]\n\n- Prevent fieldname losing for for current field\n  [bogdangi]\n\n- Fixed #21 (cropping was reset on modifying image)\n  [tomgross, fRiSi]\n\n- Only test Plone 4.2 and 4.3 with Python 2.7 on Travis-CI\n  [tomgross]\n\n0.1rc2 (2013-05-03)\n-------------------\n\n- Include styles for authenticated users only.\n  [saily]\n\n- Make tests work in Plone 4.1\n  [saily]\n\n- Rename *acceptance* to *robot* to align new\n  ``plone.app.robotframework`` guidelines.\n  [saily]\n\n- Pin ``plone.app.testing`` to make Plone 4.1 tests work.\n  [saily]\n\n- Use correct dependency for plone.app.testing with extra ``[robot]``.\n  [saily]\n\n- Add cropping ui-tests using robotframework\n  [saily]\n\n- Update ``bootstrap.py`` to work with ``zc.buildout`` 2.0\n  [saily]\n\n- Implemented #11 - Mark image scales as \"croppable\"\n  [jensens]\n\n- Added tests for control panel and registry\n- Added Spanish and Brazilian Portuguese translations\n  [hvelarde]\n\n- Small documentation update\n  [saily]\n\n\n0.1rc1 (2013-03-11)\n-------------------\n\n- add support for multiple image fields\n- refactored javascript includes so the editor can be loaded as overlay\n- fixed JS error when editor is invisible (ie editor is loaded in an overlay)\n- fixed edit/remove actions when editor is loaded as overlay\n- make editor view more convenient (disable columns)\n- update documentation\n  [petschki]\n\n0.1b1 (2013-03-03)\n------------------\n\n- Made cropping work in dexterity-only sites\n  [pysailor]\n\n- Add travis integration\n  [saily]\n\n\n0.1a2 (2012-11-10)\n------------------\n\n- fix tests\n- add test setups for Plone 4.1-4.3\n- Products.CMFPlone dependency. Right now we only support Plone >= 4.1\n- make dexterity support optional\n  [petschki]\n\n\n0.1a1 (2012-11-05)\n------------------\n\n- public alpha release\n  [petschki]\n- Package created using templer\n  [fRiSi]\n\n.. _`#57`: https://github.com/collective/collective.cover/issues/57\n",
    "bugtrack_url": null,
    "license": "GPLv2",
    "summary": "Crops Images in Plone manually using cropper JS library",
    "version": "3.0.2",
    "project_urls": {
        "Homepage": "https://github.com/collective/plone.app.imagecropping"
    },
    "split_keywords": [
        "plone",
        "image",
        "crop"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3fb9292c7f1ed03ebc5ff00e88df12867f4737e609087098c0ffef868144005",
                "md5": "15c204f07b72341fe043db9bba1e2d2c",
                "sha256": "6c4707ad818f74349aafceb0e699c4814ed8868de22ffb52417ae4404bf6a7b5"
            },
            "downloads": -1,
            "filename": "plone.app.imagecropping-3.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "15c204f07b72341fe043db9bba1e2d2c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 468135,
            "upload_time": "2023-10-09T12:21:39",
            "upload_time_iso_8601": "2023-10-09T12:21:39.226167Z",
            "url": "https://files.pythonhosted.org/packages/f3/fb/9292c7f1ed03ebc5ff00e88df12867f4737e609087098c0ffef868144005/plone.app.imagecropping-3.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4411a6b59048995bd197d3757a9ea3797a218221d3bdc886984cace92945d8e",
                "md5": "47332ded939ea292a95f5c17e2a9b9b2",
                "sha256": "c1fe281537b46afbb4c40b6fc58871c6905b36237fd0c5980ea28d0218a667dc"
            },
            "downloads": -1,
            "filename": "plone.app.imagecropping-3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "47332ded939ea292a95f5c17e2a9b9b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1002829,
            "upload_time": "2023-10-09T12:21:45",
            "upload_time_iso_8601": "2023-10-09T12:21:45.601723Z",
            "url": "https://files.pythonhosted.org/packages/c4/41/1a6b59048995bd197d3757a9ea3797a218221d3bdc886984cace92945d8e/plone.app.imagecropping-3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-09 12:21:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "collective",
    "github_project": "plone.app.imagecropping",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "plone.app.imagecropping"
}
        
Elapsed time: 0.17380s