{"id":15132151,"url":"https://github.com/hansalemaos/a_cv2_text_effects","last_synced_at":"2026-02-19T17:01:04.947Z","repository":{"id":65235887,"uuid":"588867182","full_name":"hansalemaos/a_cv2_text_effects","owner":"hansalemaos","description":"Text effects for OpenCV","archived":false,"fork":false,"pushed_at":"2023-01-18T20:23:13.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T04:11:36.168Z","etag":null,"topics":["opencv","python","text"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/a-cv2-text-effects/","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/hansalemaos.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":"2023-01-14T09:43:00.000Z","updated_at":"2023-01-14T09:44:40.000Z","dependencies_parsed_at":"2023-02-10T17:35:18.358Z","dependency_job_id":null,"html_url":"https://github.com/hansalemaos/a_cv2_text_effects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hansalemaos/a_cv2_text_effects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_cv2_text_effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_cv2_text_effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_cv2_text_effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_cv2_text_effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansalemaos","download_url":"https://codeload.github.com/hansalemaos/a_cv2_text_effects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_cv2_text_effects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29623546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["opencv","python","text"],"created_at":"2024-09-26T04:04:14.526Z","updated_at":"2026-02-19T17:01:04.929Z","avatar_url":"https://github.com/hansalemaos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Text effects for OpenCV\n# Font color doesn't work yet\n\n\n```python\n$pip install a-cv2-text-effects\n\nimport os\nfrom a_cv_imwrite_imread_plus import open_image_in_cv,save_cv_image\nfrom a_cv2_text_effects import (\n    put_ttf_font_multiline_in_box_at_exact_center_location_with_exact_size,\n    put_ttf_font_multiline_at_exact_center_location_with_exact_size,\n    put_ttf_font_multiline_at_exact_location_with_exact_size,\n    put_ttf_font_multiline_in_box_at_exact_location_with_exact_size,\n    put_ttf_font_in_circle_at_exact_location_with_exact_size,\n    put_ttf_font_in_box_at_exact_location_with_exact_size,\n    put_ttf_font_at_exact_location_with_exact_size,\n    putTrueTypeText,\n    center_text_at_certain_size_at_a_specific_point,\n    center_of_text_at_certain_size_at_a_specific_point_with_boxes,\n)\n\nimg = open_image_in_cv(\n    \"https://raw.githubusercontent.com/hansalemaos/screenshots/main/merg6.png\"\n)\nmaxwidth = 150\nmaxheight = 150\n\n(\n    imgresult1,\n    ptLowerLeftTextOriginX2,\n    ptLowerLeftTextOriginY2,\n    intFontFace2,\n    fltFontScale2,\n    intFontThickness2,\n    textSize2,\n) = center_of_text_at_certain_size_at_a_specific_point_with_boxes(\n    img,\n    \"Number 1\",\n    maxwidth,\n    maxheight,\n    wheretoput=(200, 200),\n    color=(255, 255, 0),\n    add_thickness_each=10,\n    rectangle_border_size=5,\n    rectangle_border_colors=((244, 255, 0), (244, 0, 255)),\n)\n\n(\n    imgresult2,\n    ptLowerLeftTextOriginX,\n    ptLowerLeftTextOriginY,\n    intFontFace,\n    fltFontScale,\n    intFontThickness,\n    textSize,\n) = center_text_at_certain_size_at_a_specific_point(\n    img,\n    \"Number 2\",\n    maxwidth,\n    maxheight,\n    wheretoput=(100, 100),\n    color=(255, 255, 0),\n    add_thickness_each=10,\n)\n\nimgresult3 = putTrueTypeText(\n    img=img,\n    text=\"Number 3\",\n    org=(100, 100),\n    fontFace=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    fontScale=56,\n    color=(255, 255, 0),\n)\n\n\nia = put_ttf_font_at_exact_location_with_exact_size(\n    image=img,\n    text=\"Number 4\",\n    coords=(59, 300),\n    color=(100, 0, 100),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=300,\n    maxheight=100,\n    fonttransparency=100,\n)\n\nia1 = put_ttf_font_in_box_at_exact_location_with_exact_size(\n    image=img,\n    text=\"Number 5\",\n    coords=(59, 300),\n    color=(100, 0, 100),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=300,\n    maxheight=100,\n    fonttransparency=0,\n    boxtransparency=0.7,\n    boxcolor=(255, 0, 0),\n)\n\nia2 = put_ttf_font_in_circle_at_exact_location_with_exact_size(\n    image=img,\n    text=\"Number 6\",\n    coords=(59, 300),\n    color=(100, 0, 100),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=300,\n    maxheight=100,\n    fonttransparency=50,\n    circletransparency=0.2,\n    circlecolor=(255, 0, 0),\n)\n\n\nia3 = put_ttf_font_multiline_in_box_at_exact_location_with_exact_size(\n    image=img,\n    textwithnewline=\"Number 7\\nNumber 7\\nNumber 7\",\n    coords=(59, 10),\n    color=(100, 0, 100),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=600,\n    maxheight=600,\n    fonttransparency=50,\n    boxtransparency=0.2,\n    boxcolor=(255, 0, 0),\n    boxborder=20,\n)\n\n\nia4 = put_ttf_font_multiline_at_exact_location_with_exact_size(\n    image=img,\n    textwithnewline=\"Number 8\\nNumber 8\\nNumber 8\",\n    coords=(59, 10),\n    color=(100, 0, 100),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=600,\n    maxheight=600,\n    fonttransparency=50,\n)\n\n\nia5 = put_ttf_font_multiline_at_exact_center_location_with_exact_size(\n    image=img,\n    textwithnewline=\"Number 9\\nNumber 9\\nNumber 9\",\n    coords=(300, 300),\n    color=(255, 255, 210),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=300,\n    maxheight=100,\n    fonttransparency=-1,\n)\n\n\nia6 = put_ttf_font_multiline_in_box_at_exact_center_location_with_exact_size(\n    image=img,\n    textwithnewline=\"Number 10\\nNumber 10\\nNumber 10\",\n    coords=(300, 300),\n    color=(255, 255, 210),\n    font=r\"C:\\Windows\\Fonts\\ANTQUAB.TTF\",\n    maxwidth=300,\n    maxheight=100,\n    fonttransparency=50,\n    boxtransparency=0.2,\n    boxcolor=(255, 0, 0),\n    boxborder=20,\n)\n\n\nallimgs=    [\n        imgresult1,\n        imgresult2,\n        imgresult3,\n        ia[\"result\"],\n        ia1[\"result\"],\n        ia2[\"result\"],\n        ia3[\"result\"],\n        ia4[\"result\"],\n        ia5[\"result\"],\n        ia6[\"result\"],\n\n    ]\nfor i,b in enumerate(allimgs):\n    save_cv_image(os.path.join('f:\\\\alltextimgs',str(i).zfill(6) + '.png'), b)\n\n```\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000000.png\"/\u003e\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000000.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000001.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000002.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000003.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000004.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000005.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000006.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000007.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000008.png\"/\u003e\n\n\n\n\u003cimg src=\"https://github.com/hansalemaos/screenshots/raw/main/texteffects/000009.png\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansalemaos%2Fa_cv2_text_effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansalemaos%2Fa_cv2_text_effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansalemaos%2Fa_cv2_text_effects/lists"}