@boruto_vk7/stickengine 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -95
- package/dist/cjs/logo_small.png +0 -0
- package/dist/esm/logo_small.png +0 -0
- package/logo_small.png +0 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</p>
|
|
1
|
+
# StickEngine - Lagos Solutions
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
**Motor profissional de figurinhas para WhatsApp**
|
|
6
|
+
Estático e animado, com EXIF, marca d'água com sua logo e suporte total ESM + CJS + TypeScript
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/@boruto_vk7/stickengine)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://www.npmjs.com/package/@boruto_vk7/stickengine)
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
> SOLUÇÕES INTELIGENTES. RESULTADOS REAIS.
|
|
17
16
|
|
|
18
17
|
---
|
|
19
18
|
|
|
@@ -35,7 +34,7 @@ FFmpeg já incluso via `@ffmpeg-installer/ffmpeg`. Não precisa instalar manualm
|
|
|
35
34
|
- ✅ **EXIF com pack e autor:** Compatível com node-webpmux v1 e v3
|
|
36
35
|
- ✅ **Auto shrink:** Figurinhas animadas sempre abaixo de 1MB
|
|
37
36
|
- ✅ **Dirtemp custom:** `Dirtemp`, `tempDir`, `dirTemp` - qualquer alias funciona
|
|
38
|
-
- ✅ **Marca d'água:** `watermark: true
|
|
37
|
+
- ✅ **Marca d'água com LOGO:** `watermark: true` usa sua `logo.png` automaticamente
|
|
39
38
|
- ✅ **Compatível:** ESM `import`, CJS `require()`, TypeScript `NodeNext` e `CommonJS`
|
|
40
39
|
- ✅ **APIs antigas:** `sendImageAsSticker`, `imageToWebp`, `writeExifImg` ainda funcionam
|
|
41
40
|
|
|
@@ -72,7 +71,7 @@ const buffer = await StickEngine.toBuffer('./video.mp4', {
|
|
|
72
71
|
});
|
|
73
72
|
```
|
|
74
73
|
|
|
75
|
-
### Com marca d'água
|
|
74
|
+
### Com marca d'água LOGO
|
|
76
75
|
|
|
77
76
|
```javascript
|
|
78
77
|
await StickEngine.create('./imagem.png', {
|
|
@@ -82,12 +81,7 @@ await StickEngine.create('./imagem.png', {
|
|
|
82
81
|
});
|
|
83
82
|
|
|
84
83
|
await StickEngine.create('./imagem.png', {
|
|
85
|
-
watermark: '
|
|
86
|
-
metadata: { pack: 'Pack', author: 'Author' }
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
await StickEngine.create('./imagem.png', {
|
|
90
|
-
watermark: { text: 'LAGOS', position: 'center', margin: 20 },
|
|
84
|
+
watermark: { image: './logo.png', position: 'center', size: 0.4, opacity: 0.6 },
|
|
91
85
|
metadata: { pack: 'Pack', author: 'Author' }
|
|
92
86
|
});
|
|
93
87
|
|
|
@@ -123,22 +117,22 @@ Aceita qualquer alias:
|
|
|
123
117
|
new StickEngine({ Dirtemp: './minha-pasta' })
|
|
124
118
|
new StickEngine({ tempDir: './minha-pasta' })
|
|
125
119
|
new StickEngine({ dirTemp: './minha-pasta' })
|
|
126
|
-
new StickEngine({ DirTemp: './minha-pasta' })
|
|
127
120
|
```
|
|
128
121
|
|
|
129
122
|
Padrão: `os.tmpdir()/stickengine`
|
|
130
123
|
|
|
131
124
|
---
|
|
132
125
|
|
|
133
|
-
## 💧 Marca d'água
|
|
126
|
+
## 💧 Marca d'água LOGO
|
|
127
|
+
|
|
128
|
+
Sua logo `logo.png` é usada automaticamente:
|
|
134
129
|
|
|
135
130
|
```javascript
|
|
136
131
|
{ watermark: true }
|
|
137
132
|
{ watermark: false }
|
|
138
|
-
{ watermark: '
|
|
139
|
-
{ watermark: {
|
|
133
|
+
{ watermark: './caminho/para/outra-logo.png' }
|
|
134
|
+
{ watermark: { image: './logo.png', position: 'bottom-right', size: 0.25 } }
|
|
140
135
|
{ marcaDagua: true }
|
|
141
|
-
{ marca_agua: true }
|
|
142
136
|
```
|
|
143
137
|
|
|
144
138
|
Posições: `bottom-right`, `bottom-left`, `top-right`, `top-left`, `center`
|
|
@@ -147,10 +141,8 @@ Posições: `bottom-right`, `bottom-left`, `top-right`, `top-left`, `center`
|
|
|
147
141
|
|
|
148
142
|
## 🔄 Compatibilidade com código antigo
|
|
149
143
|
|
|
150
|
-
### rename.js antigo
|
|
151
144
|
```javascript
|
|
152
|
-
const { sendImageAsSticker
|
|
153
|
-
|
|
145
|
+
const { sendImageAsSticker } = require('@boruto_vk7/stickengine');
|
|
154
146
|
await sendImageAsSticker(conn, jid, './foto.jpg', quoted, {
|
|
155
147
|
packname: 'Meu Pack',
|
|
156
148
|
author: 'Bot',
|
|
@@ -158,68 +150,17 @@ await sendImageAsSticker(conn, jid, './foto.jpg', quoted, {
|
|
|
158
150
|
});
|
|
159
151
|
```
|
|
160
152
|
|
|
161
|
-
### exif.js antigo
|
|
162
|
-
```javascript
|
|
163
|
-
const { imageToWebp, writeExifImg } = require('@boruto_vk7/stickengine');
|
|
164
|
-
|
|
165
|
-
const webpBuffer = await imageToWebp(buffer);
|
|
166
|
-
const path = await writeExifImg(buffer, { packname: 'Pack', author: 'Author' });
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Todos os inputs antigos funcionam:
|
|
170
|
-
- `Buffer`
|
|
171
|
-
- `data:image/png;base64,...`
|
|
172
|
-
- `https://exemplo.com/foto.jpg`
|
|
173
|
-
- `./caminho/local.jpg`
|
|
174
|
-
- `base64 puro`
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## 📊 Tipos de Figurinha Testados
|
|
179
|
-
|
|
180
|
-
- ✅ PNG estático 512x512
|
|
181
|
-
- ✅ JPG 800x600
|
|
182
|
-
- ✅ Retrato 1080x1920 -> 288x512 natural
|
|
183
|
-
- ✅ Paisagem 1920x1080 -> 512x288 natural
|
|
184
|
-
- ✅ PNG transparente
|
|
185
|
-
- ✅ Buffer direto
|
|
186
|
-
- ✅ Path local
|
|
187
|
-
- ✅ Data URI base64
|
|
188
|
-
- ✅ Base64 puro sem prefixo
|
|
189
|
-
- ✅ URL remota com fallback emror.jpg
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## ⚙️ Opções Completas
|
|
194
|
-
|
|
195
|
-
```javascript
|
|
196
|
-
await StickEngine.create(input, {
|
|
197
|
-
Dirtemp: './temp',
|
|
198
|
-
tempDir: './temp',
|
|
199
|
-
watermark: true,
|
|
200
|
-
fit: 'natural',
|
|
201
|
-
fps: 15,
|
|
202
|
-
quality: 80,
|
|
203
|
-
maxDuration: 6,
|
|
204
|
-
metadata: {
|
|
205
|
-
pack: 'Lagos Solutions',
|
|
206
|
-
author: 'Borutovk7',
|
|
207
|
-
emojis: ['✨', '🔥'],
|
|
208
|
-
id: 'meu-pack-id'
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
```
|
|
212
|
-
|
|
213
153
|
---
|
|
214
154
|
|
|
215
|
-
##
|
|
155
|
+
## 📊 Testado
|
|
216
156
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
157
|
+
- ✅ PNG, JPG, WEBP transparente, GIF, MP4, WEBM
|
|
158
|
+
- ✅ Buffer, Path local, URL https, Data URI base64, Base64 puro
|
|
159
|
+
- ✅ Dirtemp custom
|
|
160
|
+
- ✅ Watermark logo e texto
|
|
161
|
+
- ✅ Fit natural, cover, contain, fill, none
|
|
162
|
+
- ✅ ESM + CJS dual package
|
|
163
|
+
- ✅ Foto real com logo Lagos Solutions no canto e no centro
|
|
223
164
|
|
|
224
165
|
---
|
|
225
166
|
|
|
@@ -227,7 +168,6 @@ Todos os testes passaram com FFmpeg incluso.
|
|
|
227
168
|
|
|
228
169
|
MIT - Lagos Solutions
|
|
229
170
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
</p>
|
|
171
|
+

|
|
172
|
+
|
|
173
|
+
**SOLUÇÕES INTELIGENTES. RESULTADOS REAIS.**
|
|
Binary file
|
|
Binary file
|
package/logo_small.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boruto_vk7/stickengine",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Lagos Solutions - Professional WhatsApp sticker engine - Natural ratio, animated WebP EXIF, watermark, custom temp dir",
|
|
5
5
|
"author": "Borutovk7 - Lagos Solutions",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"dist",
|
|
26
26
|
"README.md",
|
|
27
27
|
"LICENSE",
|
|
28
|
-
"logo.png"
|
|
28
|
+
"logo.png",
|
|
29
|
+
"logo_small.png"
|
|
29
30
|
],
|
|
30
31
|
"engines": {
|
|
31
32
|
"node": ">=18"
|