This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Twitter: https://twitter.com/DamianCatanzaro | |
const html = "<html> \ | |
<head> \ | |
<style> \ | |
body { \ | |
margin: 0; \ | |
background-color: cyan; \ | |
width: 500px; \ | |
height: 500px; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// These three lines demonstrate how this code works. | |
let img = await Photos.fromLibrary() | |
let newImg = await processImage(img) | |
QuickLook.present(newImg) | |
// This function takes an image and returns a processed image. | |
async function processImage(image) { | |
const imageId = "imageId" | |
const canvasId = "canvasId" |