compress bmp to jpeg
npm install jpeg-compressorThis is a implementation of jpeg compressor.
``bash`
npm install jpeg-compressor
`js``
const JpegEncoder = require('../dist/index')
const encoder = new JpegEncoder();
encoder.readFromBMP('/xxx/xxx.bmp');
encoder.encodeToJPG('/xxx/xxx.jpg', 50);
| Original bmp | Compressed jpg | Compression ratio | Time used|
| --------------- | -------------- | ----------------- |----|
| 1,440,054 bytes | 68,888 bytes | 0.047,8 |3,843ms|
This project is for education only, and it's my lab homework at Harbin Institute of Technology, if you would like to use it in your project, please fork and try to improve its performance as you like.