RepositoryJavaScriptCNChina
hustcc

hustcc/alimask

:mask: alimask 是一个使用 canvas 生成类似阿里巴巴内部网站水印图片的 JavaScript 库。

174stars
41forks
5issues
0views

🎨 alimask: Tạo watermark kiểu Alibaba chỉ bằng một dòng lệnh

Thư viện JavaScript nhỏ gọn dùng canvas sinh ảnh watermark giống hệ thống nội bộ của Alibaba.

alimask là một thư viện JavaScript nhỏ, dùng Canvas để tạo ảnh watermark mang phong cách thiết kế giống với các trang web nội bộ của Alibaba (Ant Financial). Dễ dùng, hỗ trợ cài đặt qua npm hoặc script trực tiếp, phù hợp cho các dự án web cần thêm lớp bảo vệ nội dung đơn giản.

✨ Điểm nổi bật

  • Sinh ảnh bằng Canvas: tạo watermark bằng công nghệ Canvas, không phụ thuộc thư viện nặng.
  • API đơn giản: chỉ cần alimask(text, options) để tạo ngay watermark.
  • Tuỳ chỉnh màu sắc: hỗ trợ thiết lập màu chữ tùy ý, mặc định là #ebebec.
  • Điều chỉnh độ trong suống: alpha từ 0 đến 1, giúp watermark nhẹ nhàng hoặc rõ rệt tùy nhu cầu.
  • Hỗ trợ phông chữ: tuỳ chỉnh font chữ và cỡ chữ, mặc định 10px Arial.
  • Kích thước linh hoạt: width và height có thể thay đổi, mặc định 250x80.
  • Xuất base64: trả về chuỗi base64, dùng trực tiếp làm background CSS hoặc trong thẻ <img>.

💡 Vì sao đáng chú ý

Khác với các giải pháp watermark phức tạp, alimask tập trung vào sự đơn giản và hiệu quả. Chỉ với một hàm duy nhất, bạn có thể tạo ra các ảnh watermark đẹp mắt, phù hợp bảo vệ nội dung trên trang web hoặc trong tài liệu chia sẻ. Đặc biệt phù hợp cho các dự án nhỏ hoặc cần nhanh tay thêm watermark mà không muốn cài thêm thư viện nặng.


#JavaScript #Canvas #Watermark #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
guofei9987/blind_watermark

Blind&Invisible Watermark ,图片盲水印,提取水印无须原图!

14.9k
Mar 25, 2026
RepositoryJava
huangyz0918/AndroidWM

An android image watermark library that supports steganography.

1.6k
May 10, 2024
RepositoryGo
suifengqjn/videoWater

视频批量处理, 码率设置, 格式转换, 添加字幕, 添加水印, 文字跑马灯, 去除水印, 修改分辨率, 视频剪裁, 倍速播放, 视频分段, 视频合成, 视频镜像, 背景音乐, 插入背景图片, 视频高斯模糊, 模糊拓边, 画中画,字幕,翻译,影视解说,影视混剪,抖音带货,视频全自动剪辑,视频批量剪辑

1.2k
Nov 19, 2024
RepositoryPHP
ajaxray/php-watermark

Add text or image Watermark on image and PDF files

141
Aug 14, 2023
RepositoryTypeScript
excalidraw/excalidraw

Virtual whiteboard for sketching hand-drawn like diagrams

136.1k
Nov 21, 2026
RepositoryJava
alibaba/arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas

37.6k
Nov 23, 2026
RepositoryJava
alibaba/spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.

29.2k
Nov 14, 2026
RepositoryShell
ohmyzsh/ohmyzsh

🙃 A delightful community-driven (with 2,500+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

190.9k
Nov 22, 2026
RepositoryJavaScript
mrdoob/three.js

JavaScript 3D Library.

119.1k
Nov 22, 2026