oops
This commit is contained in:
parent
859997c48e
commit
3578b26583
1 changed files with 15 additions and 0 deletions
15
imageEmbedder.js
Normal file
15
imageEmbedder.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const PImage = require("pureimage"),
|
||||
app = require("./expressHandler.js").app
|
||||
|
||||
app.get("/embedImage.png", (req, res) => {
|
||||
const r = {"x": 500, "y": 300}
|
||||
|
||||
var img = PImage.make(r.x, r.y)
|
||||
|
||||
var ctx = img.getContext("2d")
|
||||
ctx.clearRect()
|
||||
ctx.fillStyle = "rgb(255, 0, 0)"
|
||||
ctx.fillRect(0, 0, 200, 100)
|
||||
|
||||
PImage.encodePNGToStream(img, res)
|
||||
})
|
Loading…
Reference in a new issue