https://github.com/tony-xlh/image-converter
Convert images files in the browser with Dynamic Web TWAIN
https://github.com/tony-xlh/image-converter
bmp jpg on-premises pdf tiff webp
Last synced: 6 months ago
JSON representation
Convert images files in the browser with Dynamic Web TWAIN
- Host: GitHub
- URL: https://github.com/tony-xlh/image-converter
- Owner: tony-xlh
- Created: 2023-07-24T02:21:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T09:45:57.000Z (about 1 year ago)
- Last Synced: 2025-04-19T07:22:06.152Z (6 months ago)
- Topics: bmp, jpg, on-premises, pdf, tiff, webp
- Language: TypeScript
- Homepage:
- Size: 1.03 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image-Converter


Convert images files in the browser with [Dynamic Web TWAIN](https://www.dynamsoft.com/web-twain/overview).
It can convert images in bmp, jpeg, png, tiff and pdf to images in jpeg, png, tiff and pdf. It runs purely in the browser.
You can select multiple images or load multiple images from a zip file. You can export the images one by one or in a zip file.
[Online demo](https://tony-xlh.github.io/Image-Converter/)
## Installation
1. Via CDN:
```html
import { ImageConverter } from 'https://unpkg.com/batch-image-converter/dist/image-converter.js';
window.onload = function(){
let container = document.querySelector('#app');
new ImageConverter({container:container});
}
```2. Via NPM:
```bash
npm install batch-image-converter
```
## Usage1. Bind the built-in UI to a container.
```js
let container = document.querySelector('#app');
new ImageConverter({container:container});
```2. Use the `convert` method to convert a file to the desired format.
```js
let files = await imageConverter.convert(file,ImageFormat.JPG);
```## Product License
You need to pass a license for Dynamic Web TWAIN. You can apply for one [here](https://www.dynamsoft.com/customer/license/trialLicense?product=dwt).
```js
new ImageConverter({license:"your license"});
```