{"id":29146320,"url":"https://github.com/zyplj/sharpicoweb","last_synced_at":"2026-05-05T09:31:45.192Z","repository":{"id":302036564,"uuid":"1007541096","full_name":"ZyPLJ/SharpIcoWeb","owner":"ZyPLJ","description":"SharpIcoWeb基于SharpIco轻量级图标生成工具，可将一张高分辨率 PNG 图片一键生成标准的 Windows .ico 图标文件，内含多种尺寸（16x16 到 256x256）。内置图标结构分析功能，轻松验证 .ico 文件中包含的图层与尺寸。采用 .NET Core Minimal API + Vue实现的web程序。","archived":false,"fork":false,"pushed_at":"2025-06-30T07:56:15.000Z","size":24027,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master-zy","last_synced_at":"2025-06-30T08:40:02.997Z","etag":null,"topics":["csharp","dotnet","ico","image","tool","vite","vue"],"latest_commit_sha":null,"homepage":"https://ico.pljzy.top/","language":"C#","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/ZyPLJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2025-06-24T06:49:33.000Z","updated_at":"2025-06-30T07:56:18.000Z","dependencies_parsed_at":"2025-06-30T08:50:26.787Z","dependency_job_id":null,"html_url":"https://github.com/ZyPLJ/SharpIcoWeb","commit_stats":null,"previous_names":["zyplj/sharpicoweb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZyPLJ/SharpIcoWeb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZyPLJ%2FSharpIcoWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZyPLJ%2FSharpIcoWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZyPLJ%2FSharpIcoWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZyPLJ%2FSharpIcoWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZyPLJ","download_url":"https://codeload.github.com/ZyPLJ/SharpIcoWeb/tar.gz/refs/heads/master-zy","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZyPLJ%2FSharpIcoWeb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262850294,"owners_count":23374357,"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":["csharp","dotnet","ico","image","tool","vite","vue"],"created_at":"2025-06-30T21:10:50.421Z","updated_at":"2026-05-05T09:31:45.180Z","avatar_url":"https://github.com/ZyPLJ.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 基于SharpIco开发图片转ICO工具网站\n\n# SharpIcoWeb\n\n[![License](https://camo.githubusercontent.com/bb4e5c0036a6a8cdbc59b38d44f09ad8f6dc722751dad34d3df5bf0ac61913c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](https://camo.githubusercontent.com/bb4e5c0036a6a8cdbc59b38d44f09ad8f6dc722751dad34d3df5bf0ac61913c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)\n\n![.NET](https://camo.githubusercontent.com/7732c145abc7fb05a8373d4d161318970723f355ddd1d080a3fbef3c6941cd0f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2e4e45542d392e302d707572706c65)\n\n![Stars](https://img.shields.io/github/stars/ZyPLJ/SharpIcoWeb?color=gold\u0026style=for-the-badge)\n\n## 📝项目介绍\n\n[SharpIcoWeb](https://github.com/ZyPLJ/SharpIcoWeb)是基于[SharpIco](https://github.com/star-plan/sharp-ico)开发的图片转ICO工具网站，支持上传png、jpg等图片转换为多尺寸的Ico图片文件。采用前后端分离技术。\n\n后端接口使用 `.NET Minimal API`开发，够轻量。\n\n## 📍项目地址\n\n`https://github.com/ZyPLJ/SharpIcoWeb`\n\n## 🎯 应用场景\n\n* 网站Favicon 🌐\n* 软件图标 🖥️\n* 个性化文件夹标识 📂\n\n```html\n\u003clink rel=\"icon\" type=\"image/x-icon\" href=\"/logo.ico\" /\u003e\n```\n\n## ✨核心技术\n\n| **⚡** **Vite+Vue+Element-Plus** **极速的开发服务器和高效的生产构建** |    **🗂️ → ❌** **纯文件操作（无需SQLite/MySQL）**    |\n| :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------: |\n|            **🏗️.NET 9 MiniAPI 轻量级API开发，处理图像转换业务逻辑**            | **🖼️** **后端使用的强大图像处理库，实现PNG/JPG转ICO** |\n|                     **🐳** **可容器化（Docker 支持）**                     |        **📱 + 💻** **响应式设计（适配移动端）**        |\n\n## ✅后续更新\n\n* [X] 不同尺寸ICO,可分别生成ICO文件。\n* [X] 前端显示ICO文件图标数量数据、大小、偏移等数据。\n* [ ] 批量转换功能。\n\n## 🚀快速开始\n\n### Docker部署\n\n\u003cfont color='red'\u003e注意注释部分配置可能需要根据实际情况修改\u003c/font\u003e\n\n#### Docker CLI\n\n```dockerfile\ndocker-compose up --build -d\n```\n\n#### default.conf\n\n```dsconfig\nserver {\n    listen       5173; # 配置端口\n    server_name  0.0.0.0; # 修改为docker服务宿主机的ip \n  \n    # 设置允许的最大请求体大小（例如 100MB）\n    client_max_body_size 100M;\n \n    location / {\n        root   /usr/share/nginx/html;\n        index  index.html index.htm;\n        try_files $uri $uri/ /index.html =404;\n    }\n  \n    location /api {\n        proxy_pass http://backend:5235;  # Docker 内部网络\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n    }\n \n    error_page   500 502 503 504  /50x.html;\n    location = /50x.html {\n        root   html;\n    }\n}\n```\n\n#### Docker Compose\n\n```yaml\nversion: '3.8'\n\nservices:\n  frontend:\n    build:\n      context: ./sharp-ico-vue   # 指向前端目录\n      dockerfile: Dockerfile\n    ports:\n      - \"5173:5173\"               # 前端映射到宿主机的5173端口\n    depends_on:\n      - backend\n\n  backend:\n    build:\n      context: .    # 指向后端目录\n      dockerfile: Dockerfile\n    ports:\n      - \"5235:5235\"            # 后端端口\n```\n\n### 手动部署\n\n#### clone\n\n`git clone https://github.com/ZyPLJ/SharpIcoWeb.git`\n\n#### 后端运行\n\n```\ncd SharpIcoWeb\n\ndotnet build -c Release\n\ndotnet run\n```\n\n#### 前端运行\n\n```bash\ncd ..\n\ncd sharp-ico-vue\n\nnpm install\n\nnpm run dev\n```\n\n## 👀如何使用\n\n前后端项目运行或部署后，打开运行后网址。\n\n选择需要生成的ICO图表尺寸，可多选\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-06/82586b88-2c72-47db-8c42-4b90d7b43235.png)\n\n上传图片文件，点击转换。\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-06/77b11313-ff66-4d3f-924d-f31c0c16b349.png)\n\n### 1.1.0 版本\n\n该版本更新了分别生成功能，将图片转为不同尺寸的单ico文件。\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-07/2756baed-a0e4-4e17-8e57-9b770def0469.png)\n\n### 1.2.0 版本\n\n该版本更新了前端显示ICO文件图标数量数据、大小、偏移等数据功能。\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-07/a2e8c67d-c95a-44f2-ad32-2259275c91db.png)\n\n### 1.5.0 版本\n\n该版本新增多语言国际化支持，支持中文、英文、日文界面切换，提升用户体验。\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-09/Snipaste_2025-09-03_10-53-51.png)\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-09/Snipaste_2025-09-03_10-54-18.png)\n\n\n## 🛠 开发指南\n\n### 项目结构\n\n```\nsharp-ico/\n├── SharpIco/               # 图标转换类库\n    ├── IcoEndpoints.cs     # 端点类\n│   ├── SharpIco.csproj\n├── SharpIcoWeb/            # 后端Api项目\n│   ├── SharpIcoWeb.csproj\n├── sharp-ico-vue           # 前端项目\n```\n\n### 开发环境\n\n* .Net 9\n* Node.js 20.19+\n* Vue3\n\n### 运行项目\n\n#### 后端\n\n```bash\ndotnet build -c Release\n\ndotnet run\n```\n\n#### 前端\n\n```bash\nnpm install\n\nnpm run dev\n```\n\n## 常见问题\n\n### 部署后前端容器不启动\n\n`unknown directive \"﻿server\" in /etc/nginx/conf.d/default.conf:1`\n\n查看前端目录下 `default.conf`文件开头是否存在特殊符号或者空格：\n\n![image.png](https://raw.githubusercontent.com/ZyPLJ/note-gen-image-sync/main/2025-07/45f8b1fc-7270-4d03-9e0a-e0f9ffac5152.png)\n\n## 相关链接\n\n* [SharpIco](https://github.com/star-plan/sharp-ico \"SharpIco是一个纯 C# AOT 实现的轻量级图标生成工具\") 🌟 Star if useful!\n\n- [SharpIcoWeb](https://github.com/ZyPLJ/SharpIcoWeb)  🌟 Star if useful!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyplj%2Fsharpicoweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyplj%2Fsharpicoweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyplj%2Fsharpicoweb/lists"}