{ "info": { "author": "Jens Klein", "author_email": "jens@bluedynamics.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Zope2", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Image field for ``Archetypes`` with different behavior at time of scaling.\n\n============\nIntroduction\n============\n\nArchtypes default ``ImageField`` scales down the image until the whole image\nfits into the given scale. It keeps it aspect ratio. I.e. scaling down a 400x300\nimage to a 200x200 scale result in a 200x150 image.\n\nSame with ``ClippingImageField`` results in a 200x200 image! It centers the\nimage horizontal or vertical and tries to keep as much as possible from the\noriginal.\n\nTested with Plone 3.3.x and Plone 4.\n\n======\nUsage:\n======\n\nField\n=====\n\nSpecify the sizes as documented for the classic Archetypes ImageField. If you\nwant specific scales to get clipped, add a field-property\n``crop_scales=['image_large','other_scale']``. It expects a list of scale\nnames to include into clipping.\n\nPatch\n=====\n\nBy including ``patch.zcml`` in your package ``archetypes.clippingimage`` will\npatch ``Products.Archetypes.Field.ImageField`` so it is able to generate\ncropped scales.\n\nYou can define which scales shall be cropped by adding a property ``crop_scales``\nto your ImageField::\n\n ImageField('image',\n sizes= {'large' : (768, 768),\n 'preview' : (400, 400),\n 'listing' : (16, 16),\n },\n crop_scales = ['listing'],\n ...\n\nNote that if you want to use clipped images within ATCTImage and have\n``plone.app.imaging`` installed you need to set a property ``crop_scales`` at\n``plone.app.blob.subtypes.image.SchemaExtender.fields[0]``.\n\nBlob\n====\n\nIn case of using the patch everythings fine. No further action needed. If you\nuse the field, you need to include the ``blob.zcml`` to make the fields scales\nblobs.\n\n=========\nCopyright\n=========\n\nwritten by Jens W. Klein, BlueDynamics Alliance, Klein & Partner KG, Austria\nhttp://bluedynamics.com\n\nContributions Harald Friessnegger and Peter Holzer.\n\n=========\nChangelog\n=========\n\n2.1\n===\n\n- use the format of original image for computing the crop. the field\n used to convert everything to png which resulted in relatively large files\n [fRiSi]\n\n2.0\n===\n\n- make plone.app.imaging and plone.app.blob aware. Works now with Plone 4.\n [jensens]\n\n- sizes can be a callable or a dictionary (instance method not supported)\n\n background: plone.app.imaging uses the sizes defined in imaging_properties in case sizes is a dictionary.\n so you need to define sizes via a callable to make your custom sizes take effect.\n [fRiSi]\n\n- added monkeypatch for ImageField.scale to add croppingsupport to any ImageField\n [jensens, fRiSi]\n\n=======\nLicense\n=======\n\nCopyright (c) 2008-2009, BlueDynamics Alliance, Austria\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n* Neither the name of the BlueDynamics Alliance nor the\n names of its contributors may be used to endorse or promote products\n derived from this software without specific prior written permission.\n \nTHIS SOFTWARE IS PROVIDED BY BlueDynamics Alliance ''AS IS'' AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL BlueDynamics Alliance BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://svn.plone.org/svn/archetypes/MoreFieldsAndWidgets/archetypes.clippingimage", "keywords": "", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "archetypes.clippingimage", "package_url": "https://pypi.org/project/archetypes.clippingimage/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/archetypes.clippingimage/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://svn.plone.org/svn/archetypes/MoreFieldsAndWidgets/archetypes.clippingimage" }, "release_url": "https://pypi.org/project/archetypes.clippingimage/2.1/", "requires_dist": null, "requires_python": null, "summary": "Image field and/or patch with clipping support for Plone/Archetypes.", "version": "2.1" }, "last_serial": 786379, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "336cb624187a5eeaeb07b10a92274349", "sha256": "a48a15398d136a65c79bb6bf2dfaedf3d7721f452fbaf55f12f244e9b2b014fd" }, "downloads": -1, "filename": "archetypes.clippingimage-1.0.tar.gz", "has_sig": false, "md5_digest": "336cb624187a5eeaeb07b10a92274349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3655, "upload_time": "2009-02-05T18:29:58", "url": "https://files.pythonhosted.org/packages/20/d6/74f91ac87e58c90cba858bd5cf8d0471e29c1664630c3a294e215b1edd26/archetypes.clippingimage-1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "20532fe457211f30467ce2ad84576ba0", "sha256": "c812c3c424f40ea4b503d3a0b98281becc2be02da9c9303372c91f5f7de675dd" }, "downloads": -1, "filename": "archetypes.clippingimage-1.1.1.tar.gz", "has_sig": false, "md5_digest": "20532fe457211f30467ce2ad84576ba0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3947, "upload_time": "2009-03-25T18:18:09", "url": "https://files.pythonhosted.org/packages/76/a1/3c7e638819eda329419bc9b49aabde67f9821ce8702c52f8b316bf6d01f5/archetypes.clippingimage-1.1.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "8d8a95410b931c1f94788ba64ea09952", "sha256": "4e606a922f69c6dc353e3c8544e4a439c0bbb828e58ca668ba2266f18ae29eda" }, "downloads": -1, "filename": "archetypes.clippingimage-2.0.tar.gz", "has_sig": false, "md5_digest": "8d8a95410b931c1f94788ba64ea09952", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5251, "upload_time": "2010-03-12T18:37:30", "url": "https://files.pythonhosted.org/packages/01/f3/ed1d430be2a31b9d1b149638aa3e2cfe444ca031bde600c65701f2ed1e51/archetypes.clippingimage-2.0.tar.gz" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "ef9503c4f9e08576448b7917d52eb6c7", "sha256": "fda522319f5df1591590dde68a45f69100fe0ed0ca251eb60305e8f3a92e7869" }, "downloads": -1, "filename": "archetypes.clippingimage-2.1-py2.6.egg", "has_sig": false, "md5_digest": "ef9503c4f9e08576448b7917d52eb6c7", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 8818, "upload_time": "2010-08-05T16:05:55", "url": "https://files.pythonhosted.org/packages/f5/16/79a874caee2210e509fe980369d9cab9a8f0640aa02d55d077837811b290/archetypes.clippingimage-2.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "a02e9e5d62382035f8ac0281c3c80d39", "sha256": "b350f07ea170696f33c89bb37437a00e11511d1097606737198a1f28da38d31e" }, "downloads": -1, "filename": "archetypes.clippingimage-2.1.zip", "has_sig": false, "md5_digest": "a02e9e5d62382035f8ac0281c3c80d39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13205, "upload_time": "2010-08-05T16:05:28", "url": "https://files.pythonhosted.org/packages/80/73/d5fdd9031de67bb4fdc6ebe7341f37c20643250755a1b48a2c376e0db84f/archetypes.clippingimage-2.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef9503c4f9e08576448b7917d52eb6c7", "sha256": "fda522319f5df1591590dde68a45f69100fe0ed0ca251eb60305e8f3a92e7869" }, "downloads": -1, "filename": "archetypes.clippingimage-2.1-py2.6.egg", "has_sig": false, "md5_digest": "ef9503c4f9e08576448b7917d52eb6c7", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 8818, "upload_time": "2010-08-05T16:05:55", "url": "https://files.pythonhosted.org/packages/f5/16/79a874caee2210e509fe980369d9cab9a8f0640aa02d55d077837811b290/archetypes.clippingimage-2.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "a02e9e5d62382035f8ac0281c3c80d39", "sha256": "b350f07ea170696f33c89bb37437a00e11511d1097606737198a1f28da38d31e" }, "downloads": -1, "filename": "archetypes.clippingimage-2.1.zip", "has_sig": false, "md5_digest": "a02e9e5d62382035f8ac0281c3c80d39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13205, "upload_time": "2010-08-05T16:05:28", "url": "https://files.pythonhosted.org/packages/80/73/d5fdd9031de67bb4fdc6ebe7341f37c20643250755a1b48a2c376e0db84f/archetypes.clippingimage-2.1.zip" } ] }