Hi Ionic Pros!
i want to create an app to watermark the selected image.
i try it using two 3rd Party packages.
both get me error Messages:
Watermarkjs:
Typescript Error Array element destructuring pattern expected.
watermark(['./assets/img/jesus.jpg', './assets/img/logo.png'])
.image(watermark.image.lowerRight(0.5))
and image-watermark:
Runtime Error Cannot find module "child_process"
Stack
Error: Cannot find module "child_process"
My Code is:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { watermarkjs } from 'image-watermark';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController) {
}
ionViewDidLoad(){
//child_process.spawn();
console.log(watermarkjs);
}
}
My System Information is:
Ionic Framework: 3.0.1
Ionic App Scripts: 1.3.0
Angular Core: 4.0.0
Angular Compiler CLI: 4.0.0
Node: 6.10.1
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
is it possible to fix these errors or are there seperate 3rd Party Addons to to get this working?
Thank You.