{"id":18778905,"url":"https://github.com/ramsailopal/imagestore","last_synced_at":"2025-12-17T19:30:15.560Z","repository":{"id":127742102,"uuid":"472793656","full_name":"RamSailopal/imagestore","owner":"RamSailopal","description":"A repo demonstrating the use of M databases as a native image store.","archived":false,"fork":false,"pushed_at":"2022-03-23T11:05:50.000Z","size":894,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T10:27:37.177Z","etag":null,"topics":["gtm","image-processing","intersystems-cache","intersystems-iris","mumps","python","yottadb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RamSailopal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-22T14:02:35.000Z","updated_at":"2022-03-22T14:04:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0923579-4d41-4a55-9a99-f77eb23a75a3","html_url":"https://github.com/RamSailopal/imagestore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Fimagestore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Fimagestore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Fimagestore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2Fimagestore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamSailopal","download_url":"https://codeload.github.com/RamSailopal/imagestore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690074,"owners_count":19681035,"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":["gtm","image-processing","intersystems-cache","intersystems-iris","mumps","python","yottadb"],"created_at":"2024-11-07T20:17:45.640Z","updated_at":"2025-12-17T19:30:15.485Z","avatar_url":"https://github.com/RamSailopal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imagestore\n\n![Alt text](imagestore.webp?raw=true \"Gitpod View\")\n\nA repo demonstrating the use of M databases as a native image store.\n\nUses **mg_python** to interface Python with YottaDB/GTM/Intersystems Cache and Iris\n\nAn image passed file location or a http link is passed. The image is then converted to a binary string and stored in an M database.\n\n# imagestore.py\n\nRunning imagestore.py requires the Python libraries **request** and **wget** to be pre installed\n\nIt also requires an M database to be running on the network with a port exposed for incoming connections to the database (through mg_python)\n\nFinally, two environmnetal variables need to be set:\n\n**yottaadd** needs to be set to the address of the M database\n\n**yottaport** needs to be set to the port of the database\n\nThe main Python executable takes 3 commands:\n\n**imgtobin** - Convert an image to a binary string to be stored in the database i.e.:\n\n     ./imagestore.py imgtobin cruise https://image.shutterstock.com/image-photo/luxury-cruise-ship-sailing-port-600w-678153238.jpg\n     \nThis will store the cruise ship image referenced from https://image.shutterstock.com/image-photo/luxury-cruise-ship-sailing-port-600w-678153238.jpg in an M database global called **IMAGES** under subscript **cruise**\n\n**bintoimg** - Convert a binary entry in an M database to an image i.e.\n\n     ./imagestore.py bintoimage cruise\n     \nThis will take the binary strings stored in the cruise subscript of the global **IMAGES**, create one string and then create a **cruise.jpeg** image file\n\n**delete** - Delete a global entry/image i.e.\n\n     ./imagestore.py delete cruise\n     \nThis will delete all binary strings associated with the **cruise** subscript in the M database global **IMAGES**\n\n# Gitpod Demo\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/RamSailopal/imagestore)\n \n1) Create a free/paid Gitpod account - https://www.gitpod.io/\n2) Log into the account\n3) Open a new browser tab and add **gitpod.io/#https://github.com/RamSailopal/imagestore** to the address - This will create a new Gitpod cloud instance.\n\nOnce everything has loaded, two image tabs will open. One will show the original cruise ship image via http link and the other will show the same images stored locally, created from the M database (see graphic above for more details)\n\n# References\n\nmg_python - https://github.com/chrisemunt/mg_python\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsailopal%2Fimagestore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framsailopal%2Fimagestore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsailopal%2Fimagestore/lists"}