{"id":16135460,"url":"https://github.com/ghandic/noteshrinker","last_synced_at":"2025-03-18T15:31:29.246Z","repository":{"id":38710443,"uuid":"142632552","full_name":"ghandic/NoteShrinker","owner":"ghandic","description":"Convert scans of handwritten notes to beautiful, compact Images","archived":false,"fork":false,"pushed_at":"2022-06-21T21:23:09.000Z","size":2183,"stargazers_count":15,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T01:37:31.743Z","etag":null,"topics":["compression","forms","image","image-processing","noteshrink","ocr"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghandic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-27T23:49:37.000Z","updated_at":"2024-12-17T11:46:29.000Z","dependencies_parsed_at":"2022-09-05T09:40:52.401Z","dependency_job_id":null,"html_url":"https://github.com/ghandic/NoteShrinker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghandic%2FNoteShrinker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghandic%2FNoteShrinker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghandic%2FNoteShrinker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghandic%2FNoteShrinker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghandic","download_url":"https://codeload.github.com/ghandic/NoteShrinker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243936382,"owners_count":20371504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","forms","image","image-processing","noteshrink","ocr"],"created_at":"2024-10-09T23:08:06.504Z","updated_at":"2025-03-18T15:31:28.812Z","avatar_url":"https://github.com/ghandic.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"NoteShrinker\n==========\n\n![GitHub stars](https://img.shields.io/github/stars/ghandic/NoteShrinker.svg?style=social\u0026label=Stars)\n![Docker build](https://img.shields.io/docker/automated/challisa/noteshrinker.svg)\n![Travis build](https://travis-ci.org/ghandic/NoteShrinker.svg?branch=master)\n![Package version](https://img.shields.io/pypi/v/NoteShrinker.svg)\n![License](https://img.shields.io/github/license/ghandic/NoteShrinker.svg)\n\nThis Repo packages up the work from [Mark Zucker](https://github.com/mzucker/noteshrink) into a python module and cli script\n\nConvert scans of handwritten notes to beautiful, compact *PDFs* [see full writeup](https://mzucker.github.io/2016/09/20/noteshrink.html)\n\nNote this package does not convert to PDF as the original module relies on ImageMagick, this is very easy to implement yourself.\n\n\nExamples\n------------\nThese examples use the default settings in the Python module.\n\nOriginal            |  NoteShrunk\n:-------------------------:|:-------------------------:\n**Size: 1.4MB**![Original example 1](Examples/Input/us_tax_form_1937.jpg?raw=true \"Original US Tax return form from 1937\")  |  **Size: 516KB**![NoteShunk example 1](Examples/Output/us_tax_form_1937.png?raw=true \"NoteShrunk US Tax return form from 1937\")\n**Size: 73KB**![Original example 2](Examples/Input/winston_churchhill_letter.jpg?raw=true \"Original letter from Winston Churchhill\")  |  **Size: 51KB**![NoteShunk example 2](Examples/Output/winston_churchhill_letter.png?raw=true \"NoteShrunk letter from Winston Churchhill\")\n**Size: 132KB**![Original example 3](Examples/Input/Restraint_of_domestic_animals.jpg?raw=true \"Original page from 'Restraint of domestic animals'\")| **Size: 109KB**![NoteShunk example 3](Examples/Output/Restraint_of_domestic_animals.png?raw=true \"NoteShrunk page from 'Restraint of domestic animals'\")\n\n\nRequirements\n------------\n\n-  Python 2 or 3\n-  NumPy 1.10 or later\n-  SciPy\n-  Image module from PIL or Pillow\n\n\nInstallation\n-----\n\n**Ensure you have Numpy, SciPy and PIL installed:**\n\n```python\npip install numpy scipy pillow\n```\n\n```python\npip install NoteShrinker\n```\n\nUsage\n-----\n\n**Docker**\n```bash\ndocker run -v $PWD/Examples/Input:/imgs challisa/noteshrinker /imgs/us_tax_form_1937.jpg -w\n```\n\n**Command line**\n```bash\n    note-shrinker IMAGE1 [IMAGE2 ...]\n```\n\n**Integrating into your Python scripts**\n\n```python\nfrom NoteShrinker import NoteShrinker\n\n# Create a NoteShrink object full of images, either an array of filepaths, PIL images or numpy arrays\nns = NoteShrinker(['test.png'], **args)\n\n# Shrink the images by calling the shrink method, this returns an array of PIL images encoded as RGB\nshrunk = ns.shrink()\n\n# Carry on with your image processing....\nfor img in shrunk:\n   img.save('example.png')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghandic%2Fnoteshrinker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghandic%2Fnoteshrinker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghandic%2Fnoteshrinker/lists"}