mirror of
https://github.com/Geckon01/Watermark.Net.git
synced 2026-07-11 06:11:52 +00:00
Update README.md
This commit is contained in:
@@ -1,2 +1,49 @@
|
|||||||
# Watermark.Net
|
# Watermark.Net
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
Watermark.Net is open source .NET library for adding text and image watermarks to images. Built on SixLabors.ImageSharp, it provides a simple yet comprehensive API for all your watermarking needs.
|
Watermark.Net is open source .NET library for adding text and image watermarks to images. Built on SixLabors.ImageSharp, it provides a simple yet comprehensive API for all your watermarking needs.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- 🖼️ Multi-format support - Works with JPEG, PNG, BMP, GIF
|
||||||
|
- ✏️ Text watermarks - Custom fonts, colors, sizes, rotations, and positioning
|
||||||
|
- 🖌️ Image watermarks - PNG transparency support, scaling, and opacity control
|
||||||
|
- 🧩 Positioning - 9 preset positions
|
||||||
|
- 🧱 Pave mode - Tile watermarks across entire image
|
||||||
|
- 📁 Batch processing - Process entire directories with single method call
|
||||||
|
|
||||||
|
# Quick Start
|
||||||
|
|
||||||
|
### Add Text Watermark
|
||||||
|
```csharp
|
||||||
|
var watermarker = new Watermarker("output");
|
||||||
|
var textWatermark = new TextWatermark
|
||||||
|
{
|
||||||
|
Text = "WATERMARK",
|
||||||
|
Font = SystemFonts.CreateFont("Arial", 36),
|
||||||
|
Color = Color.White,
|
||||||
|
Position = ImagePosition.BottomRight,
|
||||||
|
Scale = 0.5f
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = watermarker.ProcessImage("input.jpg", textWatermark); // Saves to output/input.jpg
|
||||||
|
```
|
||||||
|
### Add Image Watermark
|
||||||
|
```csharp
|
||||||
|
var watermarker = new Watermarker("output");
|
||||||
|
var imageWatermark = new ImageWatermark("logo.png")
|
||||||
|
{
|
||||||
|
Opacity = 0.7f,
|
||||||
|
Scale = 0.3f,
|
||||||
|
Position = ImagePosition.Center,
|
||||||
|
Pave = true
|
||||||
|
};
|
||||||
|
|
||||||
|
var results = watermarker.ProcessDirectory("images", imageWatermark);
|
||||||
|
```
|
||||||
|
# Contributing
|
||||||
|
Contributions are welcome! Just make sure that all tests pass before open PR.
|
||||||
|
# License
|
||||||
|
Watermark.Net is licensed under the MIT License.
|
||||||
|
|||||||
Reference in New Issue
Block a user