Chisle
The coding-agent plugin that bills 52% of a bare model across 20 live tasks. Terse persona + tool-output compressor + context diet.
翻訳待ち
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Library that adds a sticker effect to images with transparent backgrounds.
Tested with .png, .webp and .jpg.
It uses HTML Canvas, so it only works in the browser (and not in Node.js).
<script src="https://unpkg.com/@devadri/create-sticker@1/bundle.iife.js"></script>
npm install @devadri/create-sticker
<script src="https://unpkg.com/@devadri/create-sticker@1/bundle.iife.js"></script>
<script>
async function modifyImage(img) {
const options = {
strokeWidth: 20,
strokeColor: "black",
fillHoles: true
}
const stickerImgSrc = await CreateSticker.createSticker(img.src, options);
img.src = stickerImgSrc;
}
</script>
import { createSticker, CreateStickerOptions } from '@devadri/create-sticker';
async function modifyImage(img) {
const options: CreateStickerOptions = {
strokeWidth: 20,
strokeColor: "black",
fillHoles: true
}
const stickerImgSrc = await createSticker(img.src, options);
img.src = stickerImgSrc;
}
| Function | Returns |
|---|---|
createSticker(image, options?) | Promise<string>: data URL |
createStickerBlob(image, options?) | Promise<Blob> |
createStickerCanvas(image, options?) | Promise<HTMLCanvasElement> |
image can be an image URL, a Blob/File, an HTMLImageElement, an HTMLCanvasElement, an OffscreenCanvas or an ImageBitmap.
All options are optional.
| Option | Default | Description |
|---|---|---|
strokeWidth | 20 | Stroke width in pixels. |
strokeColor | "white" | Stroke color (any CSS color). |
fillHoles | true | Fill transparent holes with the stroke color. |
strokeHoles | false | When fillHoles is false, also add the stroke around holes. |
outlines | [] | Extra outlines around the stroke, e.g. [{ width: 3, color: "#999" }]. |
shadow | false | Drop shadow. true or { color, blur, offsetX, offsetY }. |
padding | strokeWidth / 2 | Transparent space added around the image, in pixels. |
trim | false | Crop the result to its visible content. |
maxSize | none | Scale down images larger than this (in pixels) before processing. |
alphaThreshold | 0 | Ignore pixels with alpha (0-255) at or below this value when finding outlines. |
crossOrigin | "anonymous" | CORS mode for image URLs. Remote images must allow CORS. |
outputType | "image/png" | Output format, e.g. "image/webp". |
outputQuality | 1 | Quality (0 to 1) for lossy formats. |
The original code comes from this Stack Overflow answer by markE. Adrián Bueno took that code, rewrote it in TypeScript and prepared it for publishing. The latest improvements were made with Claude Code.