{"id":13563597,"url":"https://github.com/LangPham/gi","last_synced_at":"2025-04-03T20:31:13.566Z","repository":{"id":53254887,"uuid":"376668277","full_name":"LangPham/gi","owner":"LangPham","description":"Gi is a library for manipulating Graphics Interfacing. Use utility mogrify, identify, ... of GraphicsMagick to resize, draw on base images....","archived":false,"fork":false,"pushed_at":"2023-12-22T07:23:48.000Z","size":3862,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T20:17:45.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/gi","language":"Elixir","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/LangPham.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-06-14T00:38:51.000Z","updated_at":"2023-01-25T10:03:14.000Z","dependencies_parsed_at":"2024-01-08T19:22:14.287Z","dependency_job_id":null,"html_url":"https://github.com/LangPham/gi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LangPham%2Fgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LangPham%2Fgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LangPham%2Fgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LangPham%2Fgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LangPham","download_url":"https://codeload.github.com/LangPham/gi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247074537,"owners_count":20879266,"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":[],"created_at":"2024-08-01T13:01:21.195Z","updated_at":"2025-04-03T20:31:13.346Z","avatar_url":"https://github.com/LangPham.png","language":"Elixir","funding_links":[],"categories":["Images"],"sub_categories":[],"readme":"# Gi\n[![Elixir CI](https://github.com/LangPham/gi/actions/workflows/elixir.yml/badge.svg)](https://github.com/LangPham/gi/actions/workflows/elixir.yml)\n![Hex.pm](https://img.shields.io/hexpm/l/gi)\n![Hex.pm](https://img.shields.io/hexpm/v/gi)\n\nGi is a library for manipulating Graphics Interfacing. Use utility mogrify, identify, ... of GraphicsMagick to resize, draw on base images....\n\n## Requirements\nYou must have [GraphicsMagick](http://www.graphicsmagick.org/) installed of course.\n\n## Features\nUtilities for image:\n* Resize image to width x height with ratio (WxH)\n```elixir\nGi.open(\"example.jpg\") # example.jpg (300x200)\n|\u003e Gi.gm_mogrify(resize: \"200x100\")\n|\u003e Gi.save() # =\u003e example.jpg (150x100)\n```\n* Resize image to width x height (WxH!)\n```elixir\nGi.open(\"example.jpg\") # example.jpg (300x200)\n|\u003e Gi.gm_mogrify(resize: \"200x100!\")\n|\u003e Gi.save() # =\u003e example.jpg (200x100)\n```\n* Format image to jpg, png, webp, ...\n```elixir\nGi.open(\"example.jpg\")\n|\u003e Gi.gm_mogrify(format: \"webp\")\n|\u003e Gi.save() # =\u003e create new file \"example.webp\"\n```  \n* Draw text on image text x,y 'string'\n```elixir\nGi.open(\"example.jpg\")\n|\u003e Gi.gm_mogrify(draw: \"text 150,150 'Theta.vn'\")\n|\u003e Gi.save() \n```  \n\n* Draw image on image \"image Over x,y,w,h file\"\n```elixir\nGi.open(\"example.jpg\")\n|\u003e Gi.gm_mogrify(draw: \"image Over 100,100,200, 200 dir/logo.a\")\n|\u003e Gi.save()\n```\n\n* Multi utilities\n```elixir\nGi.open(\"example.jpg\")\n|\u003e Gi.gm_mogrify([resize: \"300x200\", draw: \"text 150,150 'Theta.vn'\"])\n|\u003e Gi.save()\n```\n\n* Combine multiple images into one\n```elixir\nGi.open(\"frame.png\")\n|\u003e Gi.gm_composite([\"background.jpg\",\"result.png\"])\n```  \n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `gi` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:gi, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation [https://hexdocs.pm/gi](https://hexdocs.pm/gi).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLangPham%2Fgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLangPham%2Fgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLangPham%2Fgi/lists"}