gabrielarchanjo / marvinj

Javascript Image Processing Framework based on Marvin Framework

Home Page:https://www.marvinj.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MarvinJ in Ionic 4/5

NickFaulkner101 opened this issue · comments

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:

  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);
});