🚀 DAY 1 OF LAUNCH WEEK: Reachability for Ruby Now in Beta.Learn more →
Socket
Book a DemoInstallSign in
Socket

image-converter-pro

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source


Image Converter Pro

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

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) => {
            link.download = "download.png";
            link.href = dataUri;
            link.click();
          }
        )

parameters

ParameterDescriptionDefault Valuetype
imageImage Url or Data Url/Urinullany
widthOriginal Width of Image500number
heightOriginal Height of Image500number
format"jpeg", "gif", "png", "bmp", "svg", "ico""png"string
scaleAmount of scale, for example if I want image to be 50% of it's size then I will use 0.51number

</> with đź’› Vishwa Gaurav

Keywords

svg

FAQs

Package last updated on 23 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts