UNPKG
caxinha
Version:
latest (0.2.62)
0.2.62
0.2.61
0.2.60
0.2.59
0.2.58
0.2.57
0.2.56
0.2.55
0.2.54
0.2.53
0.2.52
0.2.51
0.2.35
0.2.34
0.2.33
0.2.32
0.2.31
0.2.25
0.2.24
0.2.23
0.2.22
0.2.21
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.89
0.1.88
0.1.87
0.1.86
0.1.85
0.1.84
0.1.83
0.1.82
0.1.81
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A npm of image manipulation, gif catcher and functions
caxinha
/
src
/
photoshop
/
dither.js
8 lines
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
module
.
exports
=
async
(image) => {
if
(!image)
throw
new
Error
(
"Parâmetro <image> não definido!"
);
const
jimp =
require
(
"jimp"
); image =
await
jimp.
read
(image); image.
dither565
();
let
raw =
await
image.
getBufferAsync
(
"image/png"
);
return
raw; }