{"id":19132886,"url":"https://github.com/dthung1602/image2css","last_synced_at":"2026-05-06T18:36:26.434Z","repository":{"id":144719435,"uuid":"615713266","full_name":"dthung1602/image2css","owner":"dthung1602","description":"A go package that converts images to pure CSS art with thousands of box shadows","archived":false,"fork":false,"pushed_at":"2023-03-19T04:25:53.000Z","size":7287,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T17:44:22.099Z","etag":null,"topics":["box-shadow","css","css-art","go","golang","image-processing","wasm","web-assembly"],"latest_commit_sha":null,"homepage":"https://dthung1602.github.io/image2css","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dthung1602.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-18T13:15:11.000Z","updated_at":"2023-03-18T15:48:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfd46417-a91f-43ac-95c6-94f979459837","html_url":"https://github.com/dthung1602/image2css","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dthung1602/image2css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fimage2css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fimage2css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fimage2css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fimage2css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dthung1602","download_url":"https://codeload.github.com/dthung1602/image2css/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fimage2css/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266861433,"owners_count":23996609,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["box-shadow","css","css-art","go","golang","image-processing","wasm","web-assembly"],"created_at":"2024-11-09T06:19:57.994Z","updated_at":"2026-05-06T18:36:26.393Z","avatar_url":"https://github.com/dthung1602.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- README template from https://github.com/dthung1602/image2css --\u003e\n\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![WTFPL License][license-shield]][license-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/img/logo.png\" alt=\"image2css\" width=\"300\"\u003e\n    \u003cbr/\u003e\n    \u003csmall\u003e\u003ci\u003eConvert image to pure CSS art with box shadow\u003c/i\u003e\u003c/small\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://dthung1602.github.io/image2css\" target=\"_blank\"\u003e\u003cb\u003eTry in browser\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/img/demo-css.png\" alt=\"image2css\"\u003e\n    \u003cimg src=\"docs/img/demo-monalisa.png\" alt=\"image2css\"\u003e\n\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\nUse as CLI:\n\n```bash\nmake build_cli\n./image2css --input path/to/image --output output/css/file\n```\n\nOptions:\n```\n-i, --input       Path to input image. Only support PNG, JPG and GIF\n-o, --output      Path ot output CSS file. Default: path/to/input/image/image-name.css\n-s, --selector    CSS selector to render CSS. Default: #target\n-w, --width       Target image width. Default: input image width\n-h, --height      Target image height. Default: input image height\n-r, --resolution  Size (in px) of one shadow box. 1 = best resolution. Default: 5\n```\n\n\u003e Note: try to keep the number of shadows less than 10000 \n\u003e \n\u003e Browser might freeze if there are more\n\u003e \n\u003e `shadows number = width * height / (resolution ** 2)`\n\nUse as WASM module:\n\n```\nmake build_wasm\nopen docs/index.html\n```\n\nUse as a Go package:\n\n```bash\ngo get github.com/dthung1602/image2css\n```\n\n```go\npackage main\n\nimport (\n    \"os\"\n    \"image\"\n    image2css \"github.com/dthung1602/image2css/pkg\"\n)\n\n\nfunc main() {\n    f, _ := os.Open(\"path/to/image.png\")\n    img, _, _ := image.Decode(f)\n    img = image2css.ScaleImage(img, 300, 400) // Rescale the image if you like\n\n    resolution := 4\n    cssSelector := \"#my-image\"\n    css := image2css.GenCSS(img, resolution, cssSelector)\n    // do something with the css string\n}\n```\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the WTFPL License.\n\n**You just DO WHAT THE F*CK YOU WANT TO**\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nAny contributions you make are greatly appreciated.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nDuong Thanh Hung - [dthung1602@gmail.com](mailto:dthung1602@gmail.com)\n\nProject Link: [https://github.com/dthung1602/image2css](https://github.com/dthung1602/image2css)\n\n\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n* [Original PHP implementation](https://github.com/jaysalvat/image2css)\n* [Black chancery font](https://www.freefontspro.com/14296/black-chancery.ttf)\n* [Font awesome](https://fontawesome.com/icons)\n* [Ace editor](https://ace.c9.io/)\n* [Img Shields](https://shields.io)\n* [Best README template](https://github.com/othneildrew/Best-README-Template)\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/dthung1602/image2css.svg?style=flat-square\n[contributors-url]: https://github.com/dthung1602/image2css/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/dthung1602/image2css.svg?style=flat-square\n[forks-url]: https://github.com/dthung1602/image2css/network/members\n[stars-shield]: https://img.shields.io/github/stars/dthung1602/image2css.svg?style=flat-square\n[stars-url]: https://github.com/dthung1602/image2css/stargazers\n[issues-shield]: https://img.shields.io/github/issues/dthung1602/image2css.svg?style=flat-square\n[issues-url]: https://github.com/dthung1602/image2css/issues\n[license-shield]: https://img.shields.io/github/license/dthung1602/image2css.svg?style=flat-square\n[license-url]: https://github.com/dthung1602/image2css/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthung1602%2Fimage2css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdthung1602%2Fimage2css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthung1602%2Fimage2css/lists"}