{"id":16916521,"url":"https://github.com/ternaus/base64toimageconverters","last_synced_at":"2025-10-09T00:19:58.319Z","repository":{"id":42364287,"uuid":"479107796","full_name":"ternaus/base64ToImageConverters","owner":"ternaus","description":"Library for converting from RGB / GrayScale image to base64 and back.","archived":false,"fork":false,"pushed_at":"2022-09-19T21:34:01.000Z","size":25,"stargazers_count":19,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T00:34:34.463Z","etag":null,"topics":["base64-decoding","base64-encoding","base64-image","base64image","image-processing","image2base64","jpeg","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ternaus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"ternaus","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-04-07T18:41:23.000Z","updated_at":"2024-02-27T17:54:21.000Z","dependencies_parsed_at":"2022-09-26T16:22:05.291Z","dependency_job_id":null,"html_url":"https://github.com/ternaus/base64ToImageConverters","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/ternaus%2Fbase64ToImageConverters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fbase64ToImageConverters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fbase64ToImageConverters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fbase64ToImageConverters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ternaus","download_url":"https://codeload.github.com/ternaus/base64ToImageConverters/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232814496,"owners_count":18580491,"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":["base64-decoding","base64-encoding","base64-image","base64image","image-processing","image2base64","jpeg","python"],"created_at":"2024-10-13T19:28:17.413Z","updated_at":"2025-10-09T00:19:53.284Z","avatar_url":"https://github.com/ternaus.png","language":"Python","funding_links":["https://patreon.com/ternaus"],"categories":[],"sub_categories":[],"readme":"# Library for converting RGB / Grayscale numpy images from to base64 and back.\n\n## Installation\n```bash\npip install -U image_to_base_64\n```\n\n## Conversion\nTakes `numpy.array` or `PIL.Image` as input\n\n### RGB to base 64\n```python\nbase64 = rgb2base64(rgb_image, image_format)\n```\nwhere image format is `JPEG`, `PNG`\n\n### Grayscale to base 64\n\n```python\nbase64 = grayscale2base64(grayscale_image)\n```\n\n### Base64 to RGB image\n\n```python\noutput_type = \"cv2\" # or \"PIL\"\nrgb_image = base64_to_rgb(base64, output_type)\n```\n\n### Base64 to Grayscale image\n```python\noutput_type = \"cv2\" # or \"PIL\"\ngrayscale_image = base64_to_grayscale(base64, output_type)\n```\n\n\n#### Issues\nFor some reason I cannot convert `RGB` image to `JPEG` representation in base 64 and back without losses.\n=\u003e test only for `PNG` and not `JPEG`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fbase64toimageconverters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fternaus%2Fbase64toimageconverters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fbase64toimageconverters/lists"}