We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to use node-vibrant is there a shim for document planned? https://github.com/akfish/node-vibrant/search?q=document&unscoped_q=document Currently, I'm running into the error:
node-vibrant
document
Can't find variable: document
Code example:
import { Component, OnInit } from '@angular/core'; require("nativescript-nodeify") const Vibrant = require('node-vibrant'); import * as camera from "nativescript-camera"; import { fromAsset } from "image-source"; import { knownFolders, path} from "file-system" const VERSION = "v2" @Component({ selector: 'ns-snapshot', templateUrl: './snapshot.component.html', styleUrls: ['./snapshot.component.css'], moduleId: module.id, }) export class SnapshotComponent implements OnInit { result: string; image: any = null; version = VERSION; constructor() { } ngOnInit() { console.log("checking camera") camera.requestPermissions() } getColor(imgSrc) { console.log("filepath", imgSrc) console.log("Analyzing color"); Vibrant.from(imgSrc).getPalette((err, palette) => { console.log("err", err); console.log("palette", palette); this.result = palette.toString(); }) } takeSnapshot() { console.log("taking snapshot" + VERSION) const cameraOptions = { saveToGallery: false } camera.takePicture(cameraOptions) .then( (imageAsset) => { fromAsset(imageAsset) .then((imageSource) => { const folder = knownFolders.temp(); const filePath = path.join(folder.path, "test" + ".png"); console.log('saving to', filePath) if (imageSource.saveToFile(filePath, "png", 90)) { this.getColor(filePath); } }); }).catch( (err) => { console.log("Error -> " + err.message); }); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like to use
node-vibrant
is there a shim fordocument
planned? https://github.com/akfish/node-vibrant/search?q=document&unscoped_q=documentCurrently, I'm running into the error:
Can't find variable: document
Code example:
The text was updated successfully, but these errors were encountered: