{"id":16389160,"url":"https://github.com/add-sp/easywatermark","last_synced_at":"2025-05-06T00:06:35.334Z","repository":{"id":114987808,"uuid":"240468561","full_name":"ADD-SP/EasyWatermark","owner":"ADD-SP","description":"方便地为图片添加水印的库。  A library to add watermarks to pictures.","archived":false,"fork":false,"pushed_at":"2020-02-22T16:55:34.000Z","size":68,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T00:06:28.657Z","etag":null,"topics":["dll","library","watermark"],"latest_commit_sha":null,"homepage":"","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/ADD-SP.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":"2020-02-14T09:08:45.000Z","updated_at":"2025-03-07T03:19:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c49143b1-7d3c-43c2-875c-970f7aba0170","html_url":"https://github.com/ADD-SP/EasyWatermark","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/ADD-SP%2FEasyWatermark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADD-SP%2FEasyWatermark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADD-SP%2FEasyWatermark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADD-SP%2FEasyWatermark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ADD-SP","download_url":"https://codeload.github.com/ADD-SP/EasyWatermark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596399,"owners_count":21773844,"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":["dll","library","watermark"],"created_at":"2024-10-11T04:31:45.087Z","updated_at":"2025-05-06T00:06:35.329Z","avatar_url":"https://github.com/ADD-SP.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyWatermark\n\n方便地为图片添加水印的库。默认添加到右下角。坐标系原点也为右下角。\n\nA library that can add watermark at specified coordinates. The default position is the lower right corner. The origin of the coordinate is in the lower right corner.\n\n# Build\n\nOn Windows:\n```powershell\ndotnet bulid -c Release\n```\n\n# How to use\n\n引用\"EasyWatermark.dll\"后添下列代码即可。\n\nYou should reference \"EasyWatermark.dll\" to your project and add the following code:\n```C#\nusing EasyWatermark;\n```\n\n# Example\n\n原图如下（图片来自网络）：\n\nTake this picture as an example：\n\n![](.image/origin.jpg)\n\n## First\n\n给target.jpg的右下角添加一行字，内容为“Hello World”，字体为“思源宋体 CN Heavy”，字体大小50像素，白色，透明度200，处理后的图片保存为“result0.jpg”。\n\nThe watermark content is “Hello World”, the font is “思源宋体 CN Heavy”, the size is 50 pixels, the color is white, and the alpha is 200.\n\n```C#\nImage watermark = EWatermark.GetWatermark(\"Hello World\", 50, new FontFamily(\"思源宋体 CN Heavy\"), Color.White, 200);\n\nImage result = EWatermark.AddWatermark(\"target.jpg\", watermark);\n\nresult.Save(\"result0.jpg\", ImageFormat.Jpeg);\n```\n![](.image/result0.jpg)\n\n## Second\n\n```C#\nImage watermark = EWatermark.GetWatermark(\"测试用水印\", 50, new FontFamily(\"思源宋体 CN Heavy\"), Color.White, 200);\n\nImage result = EWatermark.AddWatermark(\"target.jpg\", watermark);\n\nresult.Save(\"result1.jpg\", ImageFormat.Jpeg);\n```\n\n![](.image/result1.jpg)\n\n## Third\n\n以watermark.jpg为水印图片为target.jpg打上水印。\n\nUse “watermark.jpg” as a watermark picture to watermark “target.jpg”.\n\n\n```C#\nImage result = EWatermark.AddWatermark(\"target.jpg\", \"watermark.jpg\");\n\nresult.Save(\"result.jpg\", ImageFormat.Jpeg);\n```\n\n# Note\n\n+ 这个库的性能较低，建议应用于性能不敏感的场景。\n\n+ The performance of this library is not good, it is recommended to use it as needed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadd-sp%2Feasywatermark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadd-sp%2Feasywatermark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadd-sp%2Feasywatermark/lists"}