main
Keir Finlow-Bates 2 years ago
parent b94b29536f
commit 9db8f40f6d

@ -7,6 +7,22 @@ export default async function handler(req, res) {
try {
const image = await Jimp.read(baseURL + img)
const crest = image.clone().crop(3,5,60,96)
const level = parseInt(
img.substring(
img.indexOf("-") + 1,
img.lastIndexOf(".")
)
)
if (level % 8 > 0) {
image
.composite(crest, 10, 173, {
mode: Jimp.BLEND_SOURCE_OVER,
})
}
image
.crop(4,168,412,190)
.resize(316,143)

Loading…
Cancel
Save