{ "info": { "author": "Luis Nell", "author_email": "cooperate@originell.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Multimedia :: Graphics" ], "description": "# sorl-watermark\n\nAs of 12th July 2013, *vbazhin* will be taking over development and take care of implementing all the\nmentioned features. Everybody welcome him with a warm applause :D!\n\nsorl-watermark offers drop-in engines for sorl-thumbnail, which automagically\ninsert a specified image as watermark on top of the original thumbnail. \n\nOf course everything is configurable, from watermark image to the position and\nthe opacity.\n\nIf you are looking for a sorl engine to dynamically create text watermarks,\nyou might want to have a look at [zeus/watermark](https://bitbucket.org/zeus/watermarker/overview).\n\n_Note_: This project uses [Semantic Versioning](http://semver.org/) as it's\n versioning scheme.\n\n## Setup\nInstall sorl-watermark, either by cloning from the [github repository]() or\nby installing it via `pip`:\n\n pip install sorl_watermarker\n\nChange sorl's thumbnail engine to the fitting one from sorl-watermark.\nBy now PIL and pgmagick engines are implemented.\n\nPIL:\n\n THUMBNAIL_ENGINE = 'sorl_watermarker.engines.pil_engine.Engine'\n\nPgmagick:\n\n THUMBNAIL_ENGINE = 'sorl_watermarker.engines.pgmagick_engine.Engine'\n\n\nNext up you tell it which image should be used as a watermark. Note that this\nfile has to live somewhere inside STATIC\\_ROOT.\n\n THUMBNAIL_WATERMARK = 'my_watermark.png'\n\nThat's it for a simple setup. The engine will only apply the watermark\nif the thumbnail size is big enough. \n\nSee _Advanced Usage_ for ways to dynamically change the watermark itself,\nit's size or ways to selectively apply watermarks.\n\n## Engines\nsorl-watermark supports two of sorl-thumbnails backends:\n\n* PIL (sorl_watermarker.engines.pil)\n* GraphicsMagick (Magick++) via pgmagick (sorl_watermarker.engines.magick)\n\n## Advanced Usage\nsorl-watermark also _enhances_ the default `thumbnail` templatetag with some\nmore options. (Well, actually it does not really enhance it, since the templatetag\nitself passes the options through to the engine itself by default)\n\nBy default, the templatetag syntax is:\n\n {% thumbnail image key1=var1 key2=var2 %}\n\nThe following new options are available:\n\n* `watermark=imagefile` \n This options takes an ImageFile and uses this one instead of the default\n watermark file, set via `THUMBNAIL_WATERMARK`\n* `watermark_size=\"x200\"` \n Changes the watermark's size. Takes the same options as the\n `THUMBNAIL_WATERMARK_SIZE` option.\n* `watermark_pos=\"north east\"` \n Specifies where the watermark shall be put. Accepts the same options as the\n `THUMBNAIL_WATERMARK_POSITION` setting.\n* `watermark_alpha=0.9` \n Sets the watermark's opacity. Has to be a value between 0 and 1.\n\n## Settings Reference\nThe following settings are available\n\n* `THUMBNAIL_WATERMARK` \n Sets the image to be used as a watermark. The file must live within \n `STATIC_ROOT`.\n\n* `THUMBNAIL_WATERMARK_ALWAYS` \n Stamp a watermark on every image. \n Default is `True`.\n\n* `THUMBNAIL_WATERMARK_SIZE` \n Change the size of the watermark. This can either be a geometry string, as\n is usual with sorl-thumbnail (\"x200\", \"200x200\"), or a percentage. \n If given a percentage, the watermark will always be the given percentage\n of the thumbnail size.\n\n* `THUMBNAIL_WATERMARK_OPACITY`\n An integer from 0 to 1, specifying the opacity of the watermark. \n Default is `0` (opaque).\n\n* `THUMBNAIL_WATERMARK_POSITION` \n Specifies the position of the watermark. You can either pass this a gravity\n like\n\n * \"north\"\n * \"south\"\n * \"west\"\n * \"east\"\n * \"north east\"\n * \"south east\"\n * \"north west\"\n * \"south west\"\n * \"center\"\n\n If you want to tile your image completely with a watermark, you should set\n \n THUMBNAIL_WATERMARK_POSITION = 'tile'\n\n\n or with a pair of values in pixels (\"20 20\" would place watermark near the left-top corner,\n \"-20 -20\" - near the right-bottom corner). \n Default: `\"south east\"`", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/originell/sorl-watermark", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "sorl-watermark", "package_url": "https://pypi.org/project/sorl-watermark/", "platform": "any", "project_url": "https://pypi.org/project/sorl-watermark/", "project_urls": { "Homepage": "https://github.com/originell/sorl-watermark" }, "release_url": "https://pypi.org/project/sorl-watermark/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Image based watermarks for sorl-thumbnail", "version": "1.0.0" }, "last_serial": 1240388, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2d13fe4e9c3390e92dc56e3c3b4536ee", "sha256": "ad17bac59d237228b00f33ce978d87e01b07cc9f83ca7822237892c4dbd29076" }, "downloads": -1, "filename": "sorl-watermark-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2d13fe4e9c3390e92dc56e3c3b4536ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8183, "upload_time": "2014-09-28T00:09:23", "url": "https://files.pythonhosted.org/packages/e6/7b/196a8fff7b6d665d860b39e05f6f0c5eda7a60474fadff178278dc28897b/sorl-watermark-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2d13fe4e9c3390e92dc56e3c3b4536ee", "sha256": "ad17bac59d237228b00f33ce978d87e01b07cc9f83ca7822237892c4dbd29076" }, "downloads": -1, "filename": "sorl-watermark-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2d13fe4e9c3390e92dc56e3c3b4536ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8183, "upload_time": "2014-09-28T00:09:23", "url": "https://files.pythonhosted.org/packages/e6/7b/196a8fff7b6d665d860b39e05f6f0c5eda7a60474fadff178278dc28897b/sorl-watermark-1.0.0.tar.gz" } ] }