Skip to content

A Web Component that gives you the power of ImageMagick with the ease of use of the <img> tag.

License

Notifications You must be signed in to change notification settings

f0urfingeredfish/img-magick

Repository files navigation

<img-magick>

Software License Issues NPM Latest Version

A Web Component that gives you the power of WASM-ImageMagick with the ease of use of the <img> tag.

Live Demo Edit the attributes with your dev tools to see live updates!

remix this

Install

npm i img-magick

Usage

In a Javascript module

import 'img-magick';

In html page:

<script type="module" src="https://unpkg.com/img-magick/dist/img-magick.umd.js"></script>

or

<script type="module" src="path/to/bundled/img-magick.js"></script>

Add component to appliction or page:

 <img-magick src="./test.png" cmd="convert * -paint 3"></img-magick>

Results: image

Attributes

Attributes Description Default
cmd Any ImageMagick command ""
src Image URL ""
showLoader Show the loading spinner when processing false
loaderColor Color of the loading indicator #606060
loaderSize Size of the loader 25px

Example with custom loading indicator:

 <img-magick src="./test.png" cmd="convert * -paint 3" showLoader loaderSize="100px" loaderColor="red"></img-magick>

Development

Run dev server with hot reloading

npm start

About

A Web Component that gives you the power of ImageMagick with the ease of use of the <img> tag.

Resources

License

Stars

Watchers

Forks

Packages

No packages published