This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

BIN
node_modules/bmp-js/test/bit1.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
node_modules/bmp-js/test/bit16_565.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
node_modules/bmp-js/test/bit16_565_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit16_a444.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
node_modules/bmp-js/test/bit16_a444_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit16_a555.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
node_modules/bmp-js/test/bit16_a555_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit16_x444.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
node_modules/bmp-js/test/bit16_x444_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit16_x555.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
node_modules/bmp-js/test/bit16_x555_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit1_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit24.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit24_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit32.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
node_modules/bmp-js/test/bit32_alpha.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
node_modules/bmp-js/test/bit32_alpha_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit32_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit4.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
node_modules/bmp-js/test/bit4_RLE.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
node_modules/bmp-js/test/bit4_RLE_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit4_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit8.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
node_modules/bmp-js/test/bit8_RLE.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
node_modules/bmp-js/test/bit8_RLE_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
node_modules/bmp-js/test/bit8_out.bmp generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

33
node_modules/bmp-js/test/test.js generated vendored Normal file
View File

@ -0,0 +1,33 @@
var fs = require("fs");
var coder = require("../index.js");
var bmps = ["./bit1", "./bit4", "./bit4_RLE", "./bit8", "./bit8_RLE", "./bit16_565", "./bit16_a444", "./bit16_a555", "./bit16_x444", "./bit16_x555", "./bit24", "./bit32", "./bit32_alpha"];
console.log("test bmp decoding and encoding...");
for(var b=0; b<bmps.length;b++){
var src =bmps[b];
console.log("----------------"+src+".bmp");
var bufferData = fs.readFileSync(src+".bmp");
var decoder = coder.decode(bufferData);
console.log("width:",decoder.width);
console.log("height",decoder.height);
console.log("fileSize:",decoder.fileSize);
//encode with 24bit
var encodeData = coder.encode(decoder);
fs.writeFileSync(src+"_out.bmp", encodeData.data);
}
console.log("test bmp success!");