Canvas is not defined


#1

When i try to add filters in the photo using CamanJS in the application it throws canvas is not defined…

<canvas id="demo-image"></canvas>

.ts file code

import 'canvas'
declare let canvas:any;

import {Caman} from 'caman';

Caman('#demo-image','#path to the image',function(){
   this.brightness(50);
   this,render(function(){
       alert("Image is Processed");
   });
});

here the camanjs library CamanJS Library anyhelp thanks


Ionic and HTML5 Canvas
#2

Whatever method i try i get

canvas is not defined

i really need some help here…:frowning: