Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vishwagauravin/image-converter-pro
Convert any image into jpeg, gif, png, svg, bmp or ico directly from your web browser with advanced features such as scale up images.
https://github.com/vishwagauravin/image-converter-pro
base64 bmp converter datauri dataurl gif icons image image-processing jpg png svg
Last synced: 3 months ago
JSON representation
Convert any image into jpeg, gif, png, svg, bmp or ico directly from your web browser with advanced features such as scale up images.
- Host: GitHub
- URL: https://github.com/vishwagauravin/image-converter-pro
- Owner: VishwaGauravIn
- License: apache-2.0
- Created: 2022-10-23T08:51:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-09T01:55:07.000Z (over 1 year ago)
- Last Synced: 2024-09-08T01:43:06.290Z (5 months ago)
- Topics: base64, bmp, converter, datauri, dataurl, gif, icons, image, image-processing, jpg, png, svg
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/image-converter-pro
- Size: 14.6 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-converter-pro
Convert any image into jpeg, gif, png, svg, bmp or ico directly from your web browser with advanced features such as scale up images.## How to Install ?
Use npm or yarn to install this npm package
```
npm i image-converter-pro --force
```## Example Code :
Example code with **download** functionality```js
import imgConverter from "image-converter-pro";let image = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgaGVpZ2h0PSczMDBweCcgd2lkdGg9JzMwMHB4JyAgZmlsbD0iIzAwMDAwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCA1LjU1NiAxMDAgODguODg5IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgNS41NTYgMTAwIDg4Ljg4OSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGc+PHBhdGggZD0iTTkwLDE2LjY2N1Y1LjU1Nkg1NS41NTZ2MTEuMTExSDQ0LjQ0NFY1LjU1NkgxMHYxMS4xMTFINy42NDFIMFY1MGg3LjY0MUgxMHYxMi4yMjNoMTEuMTExdjEwaDExLjExMXYxMi4yMjJoMTEuMTExdjEwDQoJCWgxMy4zMzN2LTEwaDExLjExVjcyLjIyM2gwLjk5NGgxMC4xMTd2LTEwSDkwVjUwaDIuMjgzSDEwMFYxNi42NjcgTTI0LjQ0NCwyOS4wMTZ2MTIuMDk2SDExLjExMVYyOS4wMTZWMTcuNzc4aDEzLjMzM1YyOS4wMTZ6Ij48L3BhdGg+PC9nPjwvc3ZnPg=="
imgConverter(image, 50, 50, "png", 1).then(
(dataUri) => {
let link = document.createElement("a");
link.download = "download.png";
link.href = dataUri;
link.click();
}
)
```## parameters
| Parameter | Description | Default Value | type |
|:----------|:-------------|:------:|------:|
| image | Image Url or Data Url/Uri | null | any |
| width | Original Width of Image | 500 | number |
| height | Original Height of Image | 500 | number |
| format | "jpeg", "gif", "png", "bmp", "svg", "ico" | "png" | string |
| scale | Amount of scale, for example if I want image to be 50% of it's size then I will use 0.5 | 1 | number |[> with 💛 Vishwa Gaurav](https://itsvg.in)