marvinj icon indicating copy to clipboard operation
marvinj copied to clipboard

MarvinJ in Ionic 4/5

Open NickFaulkner101 opened this issue 4 years ago • 2 comments

NickFaulkner101 avatar Mar 29 '20 17:03 NickFaulkner101

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 avatar Mar 29 '20 17:03 NickFaulkner101

@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:

  1. run npm i @rarebearsoft/marvinj
  2. 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);
});

JoeMeeks avatar Apr 17 '22 20:04 JoeMeeks