marvinj
marvinj copied to clipboard
MarvinJ in Ionic 4/5
Hi, Im struggling to import MarvinJ into Ionic 4/5. There is a tutorial for an earlier version of ionic but not a recent one, I was wondering if you could make a new one?
Im just really struggling to import it and then integrate it with the cordova camera plugin.
Kind regards,
Nick
@NickFaulkner101 I published a TypeScript compatible version of this library. In short, the MarvinImage class had no constructor but this version does:
https://www.npmjs.com/package/@rarebearsoft/marvinj
tl;dr from readme:
- run
npm i @rarebearsoft/marvinj
- import like so:
import MarvinImage from '@rarebearsoft/marvinj';
let canvas = document.getElementById("canvas"),
image = new MarvinImage();
image.load("https://i.imgur.com/4O8VFQY.jpg", () =>{
image.draw(canvas);
});