{
"info": {
"author": "Olivier Meunier",
"author_email": "olivier@neokraft.net",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "=========\nMiniature\n=========\n\nMiniature is two tools in one:\n\n- A library providing helpers for simple image manipulation with multiple backends\n- A optional Django application for easy thumbnail management\n\nBackends\n========\n\nMiniature comes with two supported backends: `Pillow `_ and\n`Wand `_.\n\n**Note:** Although Wand backend produce is very powerful in some areas it faces some performance\nissues and memory leaks.\n\nInstallation\n============\n\nTo install Miniature with Pillow backend if you don't have Django installed::\n\n pip install \"miniature[pillow,six]\"\n\nWith wand backend if you don't have Django installed::\n\n pip install \"miniature[wand,six]\"\n\nIf you plan to use Miniature with Django you can omit the \"six\" dependency::\n\n pip install \"miniature[pillow]\"\n\n\nThe library\n===========\n\nMiniature provides common functions to manipulate images. First thing to do is to load your\nprocessing class::\n\n from miniature.processor import get_processor\n\n Processor = get_processor('pillow')\n\n``get_processor`` will automatically load ``miniature.processor.pillow_processor`` and return\nits ``Processor`` class. You could pass a full python path as a string to load any other processor.\nYou can of course also load your own processor class in a traditional way.\n\nOnce you have your processor class you can work on images::\n\n with Processor('my-image.jpg') as p:\n p.thumbnail(200, 200).save('my-image-mini.jpg')\n\nNote that all image operation returns the processor instance allowing you to chain operations in\na big and ugly one line operation.\n\nsave(file, [format], \\*\\*options)\n---------------------------------\n\nSave the image in ``file``. ``file`` could be a file name or a file descriptor. ``format`` should be\nan available format. If not provided the extension of the file name (if any) is used or the original\nformat of the image. Other arguments are passed to the internal save method. You could pass\n``quality`` for JPEG images.\n\nclose()\n-------\n\nCloses the image resource and the associated file descriptor. You don't have to call this method\nif you use the processor as a context manager.\n\nset_background(color)\n---------------------\n\nChanges the image background color::\n\n p.set_background('#fff')\n\ncrop(\\*args)\n------------\n\nCrops the image using variable specs.\n\nTo crop with coordinates::\n\n p.crop(10, 20, 50, 70)\n\nTo crop with a ratio and a position::\n\n p.crop(1/2, 'center')\n\nPosition could be: **center**, **top-left**, **top-right**, **bottom-right**, **bottom-left**.\n\nTo crop with a ratio a a position offset::\n\n p.crop(1, '-50%', 20)\n\nOffsets are dimensions moving the cropped section from the center of the image. They could be\npercentage or integer (for pixels).\n\nFinally to let the processor determine where to move the cropped zone, you can ask him to be smart\n(what it sometime fails to be, let's face it)::\n\n p.crop(16/9, 'smart')\n\nresize(width, height)\n---------------------\n\nWell, I think it's obvious.\n\nthumbnail(width, height)\n------------------------\n\nCreates a thumbnail of the image while keeping aspect ratio. You can pass the ``upscale`` option\nwith ``True`` value to force the image size even when it's smaller than provided dimensions\n(default is ``False``).\n\nrotate(angle)\n-------------\n\nRotates the image in a counter clockwise direction following the provided ``angle``.\n\nadd_border(width, color)\n------------------------\n\nAdds a border of provided ``width`` and ``color`` around image.\n\n\nDjango Application\n==================\n\nTo be coded and documented.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/olivier-m/miniature",
"keywords": "image thumbnail",
"license": "FreeBSD",
"maintainer": null,
"maintainer_email": null,
"name": "Miniature",
"package_url": "https://pypi.org/project/Miniature/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/Miniature/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/olivier-m/miniature"
},
"release_url": "https://pypi.org/project/Miniature/0.2.0/",
"requires_dist": null,
"requires_python": null,
"summary": "Multi backend image processing and thumbnailer",
"version": "0.2.0"
},
"last_serial": 1192333,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "54b6f2c51287d043ad0ae93457e49a28",
"sha256": "887eabed6aa7cb6464da838e933e04cedad0b0908e79a85f12828875b23e047c"
},
"downloads": -1,
"filename": "Miniature-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "54b6f2c51287d043ad0ae93457e49a28",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8396,
"upload_time": "2014-08-14T15:49:45",
"url": "https://files.pythonhosted.org/packages/26/e7/0925c7bf353439789e397071aae398dec43cacaa9c8c68ffbe98a4a3ea37/Miniature-0.1.0.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "bae589bfeed10e2de79a16cf45cf08d7",
"sha256": "52029d83f0747b616afb23e46cdac198272f9d5ec152d47acd4e963fabf64d78"
},
"downloads": -1,
"filename": "Miniature-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "bae589bfeed10e2de79a16cf45cf08d7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10828,
"upload_time": "2014-08-16T12:32:12",
"url": "https://files.pythonhosted.org/packages/b7/5f/7245ece97c2be285dd33f1251e0809965aefaf578111763760d9b33bfa03/Miniature-0.2.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "bae589bfeed10e2de79a16cf45cf08d7",
"sha256": "52029d83f0747b616afb23e46cdac198272f9d5ec152d47acd4e963fabf64d78"
},
"downloads": -1,
"filename": "Miniature-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "bae589bfeed10e2de79a16cf45cf08d7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10828,
"upload_time": "2014-08-16T12:32:12",
"url": "https://files.pythonhosted.org/packages/b7/5f/7245ece97c2be285dd33f1251e0809965aefaf578111763760d9b33bfa03/Miniature-0.2.0.tar.gz"
}
]
}