@boruto_vk7/stickengine
v2.0.5
Published
Lagos Solutions - Professional WhatsApp sticker engine - Natural ratio, animated WebP EXIF, watermark, custom temp dir
Readme
StickEngine - Lagos Solutions

Motor profissional de figurinhas para WhatsApp Estático e animado, com EXIF, marca d'água com sua logo e suporte total ESM + CJS + TypeScript

SOLUÇÕES INTELIGENTES. RESULTADOS REAIS.
🚀 Instalação
npm install @boruto_vk7/stickengineFFmpeg já incluso via @ffmpeg-installer/ffmpeg. Não precisa instalar manualmente.
✨ Funcionalidades
- ✅ Todos os tipos de entrada: Buffer, caminho local, URL https, data URI base64, base64 puro
- ✅ Todos os tipos de figurinha: JPG, PNG, WEBP estático, GIF animado, MP4, WEBM
- ✅ 5 modos de enquadramento:
natural(padrão WA),cover,contain,fill,none - ✅ EXIF com pack e autor: Compatível com node-webpmux v1 e v3
- ✅ Auto shrink: Figurinhas animadas sempre abaixo de 1MB
- ✅ Dirtemp custom:
Dirtemp,tempDir,dirTemp- qualquer alias funciona - ✅ Marca d'água com LOGO:
watermark: trueusa sualogo.pngautomaticamente - ✅ Compatível: ESM
import, CJSrequire(), TypeScriptNodeNexteCommonJS - ✅ APIs antigas:
sendImageAsSticker,imageToWebp,writeExifImgainda funcionam
📦 Uso Rápido
ESM / TypeScript
import StickEngine from '@boruto_vk7/stickengine';
const sticker = await StickEngine.create('./foto.jpg', {
Dirtemp: './temp',
watermark: true,
metadata: {
pack: 'Lagos Solutions',
author: 'Borutovk7',
emojis: ['🔥']
}
});
await sock.sendMessage(jid, { sticker: sticker.buffer });CommonJS
const StickEngine = require('@boruto_vk7/stickengine');
const buffer = await StickEngine.toBuffer('./video.mp4', {
Dirtemp: '/tmp/meus-stickers',
watermark: false,
fit: 'natural',
metadata: { pack: 'Meu Pack', author: 'Bot' }
});Com marca d'água LOGO
await StickEngine.create('./imagem.png', {
Dirtemp: './temp',
watermark: true,
metadata: { pack: 'Lagos', author: 'Solutions' }
});
await StickEngine.create('./imagem.png', {
watermark: { image: './logo.png', position: 'center', size: 0.4, opacity: 0.6 },
metadata: { pack: 'Pack', author: 'Author' }
});
await StickEngine.create('./imagem.png', {
watermark: false,
metadata: { pack: 'Sem marca', author: 'Bot' }
});🎨 Modos de Enquadramento
await StickEngine.create(input, { fit: 'natural' });| Fit | Resultado |
|-----|-----------|
| natural (padrão) | Mantém proporção, lado maior = 512px - visual real do WhatsApp |
| cover | Força 512x512 quadrado com corte central |
| contain | Encaixa dentro de 512x512 com fundo transparente |
| fill | Estica para 512x512 |
| none | Só diminui se maior que 512, nunca aumenta |
📁 Dirtemp Personalizado
Aceita qualquer alias:
new StickEngine({ Dirtemp: './minha-pasta' })
new StickEngine({ tempDir: './minha-pasta' })
new StickEngine({ dirTemp: './minha-pasta' })Padrão: os.tmpdir()/stickengine
💧 Marca d'água LOGO
Sua logo logo.png é usada automaticamente:
{ watermark: true }
{ watermark: false }
{ watermark: './caminho/para/outra-logo.png' }
{ watermark: { image: './logo.png', position: 'bottom-right', size: 0.25 } }
{ marcaDagua: true }Posições: bottom-right, bottom-left, top-right, top-left, center
🔄 Compatibilidade com código antigo
const { sendImageAsSticker } = require('@boruto_vk7/stickengine');
await sendImageAsSticker(conn, jid, './foto.jpg', quoted, {
packname: 'Meu Pack',
author: 'Bot',
categories: ['🔥']
});📊 Testado
- ✅ PNG, JPG, WEBP transparente, GIF, MP4, WEBM
- ✅ Buffer, Path local, URL https, Data URI base64, Base64 puro
- ✅ Dirtemp custom
- ✅ Watermark logo e texto
- ✅ Fit natural, cover, contain, fill, none
- ✅ ESM + CJS dual package
- ✅ Foto real com logo Lagos Solutions no canto e no centro
📄 Licença
MIT - Lagos Solutions

SOLUÇÕES INTELIGENTES. RESULTADOS REAIS.
