{ "info": { "author": "soachishti", "author_email": "soachishti@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: Freeware", "Natural Language :: English", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python", "Topic :: Utilities" ], "description": "pyScanLib\r\n=========\r\n\r\nAn combination of Twain and SANE API\r\n\r\nRequirements:\r\n-------------\r\n\r\n- Python 2.\\*\r\n- SANE API for Linux\r\n- Twain Lib for Win32\r\n\r\nFunctions:\r\n----------\r\n\r\n- pyScanLib() - Main Class\r\n- getScanners() - Return Scanner with Name\r\n- setScanners(scannerName)\r\n- setDPI(dpi)\r\n- setScanArea(left,top,width,height) - For scanning selected Area size\r\n in Inches\r\n- setPixelType(\u201ccolor\u201d) - bw (Black & White), gray and color\r\n- scan() - Start Scanning\r\n- closeScanner() - Unselect selected scanner\r\n- close() - Destory connected API Class\r\n\r\nSpecial Function:\r\n-----------------\r\n\r\n- pixelToInch(pixel) - Convert Pixel(s) to Inch(es) using DPI from\r\n setDPI() or default 200\r\n- cmToInch(cm) - Convert Centimeter(s) to Inch(es)\r\n- inchTomm(inch) - Convert Inch(es) to Millimeter(s)\r\n- mmToInch(mm) - Convert Millimeter(s) to Inch(es)\r\n\r\nExample:\r\n--------\r\n\r\n::\r\n\r\n from pyScanLib import pyScanLib\r\n\r\n loadScanner = pyScanLib()\r\n scanners = loadScanner.getScanners()\r\n loadScanner.setScanner(scanners[0])\r\n\r\n loadScanner.setDPI(300)\r\n loadScanner.setScanArea(width=512,height=512) #(left,top,width,height)\r\n loadScanner.setPixelType(\"color\") #bw/gray/color\r\n\r\n PIL = loadScanner.scan()\r\n PIL.save(\"scanImage.jpg\")\r\n loadScanner.closeScanner() # unselect selected scanner in setScanners()\r\n loadScanner.close() # Destory whole class\r\n \r\n\r\nDetail Example:\r\n---------------\r\n\r\nCheck `exampleUsage.py`_ in repo\r\n\r\nNotice:\r\n-------\r\n\r\n- Not tested on Linux however work perfect on Windows.\r\n\r\nUsed in:\r\n---------------\r\n\r\n- `autoScanner`_ \r\n\r\nLicense:\r\n--------\r\n\r\npyScanLib uses BSD 2-Clause License.\r\n\r\n.. _exampleUsage.py: https://github.com/soachishti/pyScanLib/blob/master/exampleUsage.py\r\n\r\n.. _autoScanner: https://github.com/soachishti/autoScanner", "description_content_type": null, "docs_url": "https://pythonhosted.org/pyScanLib/", "download_url": "https://github.com/soachishti/pyScanLib/archive/v1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/soachishti/pyScanLib", "keywords": "scanning,scanner,twain,sane", "license": "pyScanLib\r\nLocation: https://github.com/soachishti/pyScanLib\r\n\r\nCopyright (c) 2014, SOAChishti (soachishti@outlook.com).\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are met:\r\n Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n Redistributions in binary form must reproduce the above copyright\r\n notice, this list of conditions and the following disclaimer in the\r\n documentation and/or other materials provided with the distribution.\r\n\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\nDISCLAIMED. IN NO EVENT SHALL SOAChishti BE LIABLE FOR ANY\r\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": "", "maintainer_email": "", "name": "pyScanLib", "package_url": "https://pypi.org/project/pyScanLib/", "platform": "Windows, Linux", "project_url": "https://pypi.org/project/pyScanLib/", "project_urls": { "Download": "https://github.com/soachishti/pyScanLib/archive/v1.0.tar.gz", "Homepage": "https://github.com/soachishti/pyScanLib" }, "release_url": "https://pypi.org/project/pyScanLib/v1.0/", "requires_dist": null, "requires_python": null, "summary": "An combination of Twain and SANE API", "version": "v1.0" }, "last_serial": 1784622, "releases": { "v1.0": [ { "comment_text": "", "digests": { "md5": "6d87ed37a825914d88fb2f9c643417b5", "sha256": "2fe2ea0f15928d920b9db14053025c919efa733d020ae03a737c71dba96c8146" }, "downloads": -1, "filename": "pyScanLib-v1.0.zip", "has_sig": false, "md5_digest": "6d87ed37a825914d88fb2f9c643417b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5186, "upload_time": "2015-10-24T16:12:21", "url": "https://files.pythonhosted.org/packages/0d/60/21bafdf89d927b41dcba185ae3b60a4dcae55a30f247447179847abebbcc/pyScanLib-v1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d87ed37a825914d88fb2f9c643417b5", "sha256": "2fe2ea0f15928d920b9db14053025c919efa733d020ae03a737c71dba96c8146" }, "downloads": -1, "filename": "pyScanLib-v1.0.zip", "has_sig": false, "md5_digest": "6d87ed37a825914d88fb2f9c643417b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5186, "upload_time": "2015-10-24T16:12:21", "url": "https://files.pythonhosted.org/packages/0d/60/21bafdf89d927b41dcba185ae3b60a4dcae55a30f247447179847abebbcc/pyScanLib-v1.0.zip" } ] }