{ "info": { "author": "Jens Vagelpohl", "author_email": "jens@dataflake.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Zope2", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Multimedia :: Graphics :: Presentation", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=========================\r\n Products.WatermarkImage\r\n=========================\r\n\r\n.. contents::\r\n\r\nThis package provides a Zope 2 Image content type with thumbnail and \r\nwatermarking support. It aims to be fully API-compatible with the \r\nstandard Zope Image type.\r\n\r\nData storage\r\n============\r\nWatermarkImage instances take the original image data, store it on \r\nthe instance, and generate a watermarked image as well as a thumbnail, \r\nwhich are stored on the instance as well. The watermarked image is \r\nstored as the main image, so all normal image access will return \r\nthe watermarked image. The thumbnail is a scaled-down copy of the \r\nwatermarked image.\r\n\r\nThumbnail support\r\n=================\r\nWhenever a WatermarkImage is created or updated, a thumbnail is \r\ngenerated as well. Thumbnail data can be viewed using the ZMI \r\n(Zope Management Interface) on the `Thumbnail` tab. Its data \r\ncan be accessed by adding `/thumbnail.jpg` to the WatermarkImage \r\nURL. A new method `tag_thumbnail` can be used to generate a HTML\r\n`img` tag for the thumbnail image, its arguments are the same as \r\nthe standard Zope Image's `tag` method.\r\n\r\nThe following WatermarkImage properties affect thumbnail \r\ngeneration:\r\n\r\n- Maximum thumbnail height (pixels): The maximum height for the \r\n generated thumbnail. Thumbnails retain the original image's \r\n height/width ratio, so the actual thumbnail height may be less \r\n than the maximum height specified here.\r\n\r\n- Maximum thumbnail width (pixels): The maximum width for the generated\r\n thumbnail. Thumbnails retain the original image's height/width ratio, \r\n so the actual thumbnail width may be less than the maximum width \r\n specified here.\r\n\r\nIf you change any of these properties through the ZMI `Properties` \r\ntab, the thumbnail will be regenerated automatically to reflect \r\nthe new values.\r\n\r\nWatermarking support\r\n====================\r\nIf the user specifies that a watermarked image should be created, \r\nany image upload to the WatermarkImage instance as well as \r\nproperty updates on the ZMI `Properties` tab will generate a \r\nwatermarked copy of the original image. The original image data \r\ncan be viewed using the ZMI on the `Edit Original` tab. Its data \r\ncan be accessed by adding `/original` to the WatermarkImage \r\nURL. A new method `tag_original` can be used to generate a HTML\r\n`img` tag for the original image, its arguments are the same as \r\nthe OFS.Image's `tag` method.\r\n\r\nAccess to the original image is protected by a new Zope Permission \r\nnamed `WatermarkImage: View original`. This permission is only \r\ngranted to the Zope `Manager` role by default. You can use the \r\nZMI `Security` tab to change this default setting.\r\n\r\nThe following WatermarkImage properties affect the watermarking \r\nsupport:\r\n\r\n- Watermark ID: The Zope Id of a standard Zope Image instance \r\n containing the actual watermark to be placed onto the image.\r\n\r\n- Watermark opacity: The opacity value determines how opaque the \r\n watermark will appear on the watermarked image. Its value must be \r\n betwen 0 and 1. Opacity 0 will create a transparent watermark, \r\n while opacity 1 will apply the watermark image without any transparency \r\n manipulation.\r\n\r\n- Watermark use: Select whether to create no watermark at all (`none`), \r\n position a single watermark in a specific place on the image \r\n (`position`), tile as many copies of the watermark image onto the \r\n image as possible (`tile`), or place a single watermark onto the image, \r\n scaled to the original image size (`scale`).\r\n\r\n- Watermark position on X-axis: Only applicable if `position` has been \r\n selected under `Watermark use`. The watermark's top left corner will \r\n be placed further to the right by the number of pixels set here. If \r\n you specify a negative value, placement will be determined by subtracting \r\n the provided value from the original image's width in order to allow \r\n right-aligned positioning.\r\n\r\n- Watermark position on Y-axis: Only applicable if `position` has been \r\n selected under `Watermark use`. The watermark's top left corner will \r\n be placed lower by the number of pixels set here. If you specify a \r\n negative value, placement will be determined by subtracting the provided \r\n value from the original image's height in order to allow bottom-aligned \r\n positioning.\r\n\r\nIf you change any of these properties through the ZMI `properties` \r\ntab, the watermarked image and the thumbnail will be regenerated \r\nautomatically to reflect the new values.\r\n\r\n\r\nChanging configuration defaults\r\n===============================\r\nA user can configure several settings on a per-instance basis \r\nwhich influence thumbnail and watermarked image generation. \r\nHowever, doing so for every WatermarkImage instance is tedious.\r\nInstead, a set of configuration defaults can be defined in your \r\nZope instance's `zope.conf` configuration file. Simply add a stanza \r\nnamed `product-config watermarkimage` and define new defaults::\r\n\r\n \r\n watermark_use position\r\n watermark_position_x 100\r\n watermark_position_y -100\r\n thumbmail_max_height 100\r\n thumbnail_max_width 100\r\n \r\n\r\nThe following keys and their corresponding setting on the ZMI \r\n`Properties` tab are recognized:\r\n\r\n- watermark_use: corresponds to `Watermark use`\r\n\r\n- watermark_position_x: corresponds to `Watermark position on X axis`\r\n\r\n- watermark_position_y: corresponds to `Watermark position on Y axis`\r\n\r\n- watermark_opacity: corresponds to `Watermark opacity`\r\n\r\n- watermark_id: corresponds to `Watermark ID`\r\n\r\n- thumbnail_max_height: corresponds to `Maximum thumbnail height (pixels)`\r\n\r\n- thumbnail_max_width: corresponds to `Maximum thumbnail width (pixels)`\r\n\r\nPlease note: When you set a default in `zope.conf`, it will be applied \r\nto the WatermarkImage instance at creation time. Subsequent changes in \r\nthe `zope.conf` default values will not influence existing instances.\r\n\r\n\r\nBug tracker\r\n===========\r\nIf you have suggestions, bug reports or requests please use the issue\r\ntracker at http://www.dataflake.org/tracker/\r\n\r\nSVN version\r\n===========\r\nYou can retrieve the latest code from Subversion using setuptools or\r\nzc.buildout via this URL:\r\n\r\nhttp://svn.dataflake.org/svn/Products.WatermarkImage/trunk#egg=Products.WatermarkImage\r\n\r\n\r\n\r\n------------------------------------------------------------\r\n\r\nChangelog\r\n=========\r\n\r\n1.0 (2009-05-09)\r\n----------------\r\n\r\nInitial release.\r\n\r\n------------------------------------------------------------\r\n\r\nDownload\r\n========", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/Products.WatermarkImage", "keywords": "web zope zope2 image", "license": "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)", "maintainer": "", "maintainer_email": "", "name": "Products.WatermarkImage", "package_url": "https://pypi.org/project/Products.WatermarkImage/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Products.WatermarkImage/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/Products.WatermarkImage" }, "release_url": "https://pypi.org/project/Products.WatermarkImage/1.0/", "requires_dist": null, "requires_python": null, "summary": "Zope 2 Image with thumbnail and watermarking support", "version": "1.0" }, "last_serial": 802620, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "43ee4d3b5f77ecbd6736ef2ba8ecd6a6", "sha256": "3ac81b6ec2cd01cf92d4e592f87971ed3578e6ffac52ee9d249c26e6662361ce" }, "downloads": -1, "filename": "Products.WatermarkImage-1.0.tar.gz", "has_sig": false, "md5_digest": "43ee4d3b5f77ecbd6736ef2ba8ecd6a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25076, "upload_time": "2009-05-09T14:46:09", "url": "https://files.pythonhosted.org/packages/6d/1e/e236be4478454d4553c1d2937692c4e40c32fdcfe6a682b707f01adcdde1/Products.WatermarkImage-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "43ee4d3b5f77ecbd6736ef2ba8ecd6a6", "sha256": "3ac81b6ec2cd01cf92d4e592f87971ed3578e6ffac52ee9d249c26e6662361ce" }, "downloads": -1, "filename": "Products.WatermarkImage-1.0.tar.gz", "has_sig": false, "md5_digest": "43ee4d3b5f77ecbd6736ef2ba8ecd6a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25076, "upload_time": "2009-05-09T14:46:09", "url": "https://files.pythonhosted.org/packages/6d/1e/e236be4478454d4553c1d2937692c4e40c32fdcfe6a682b707f01adcdde1/Products.WatermarkImage-1.0.tar.gz" } ] }