66% speedup

main
Keir Finlow-Bates 2 years ago
parent 4e05289a06
commit 41f382516d

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@ -51,33 +51,11 @@ const HomePage = () => {
const updateIcon = async (hue, sat) => {
const base = await Jimp.read('/img/base.png')
const bottom = await Jimp.read('/img/bottom.png')
const middle = await Jimp.read('/img/middle.png')
const top = await Jimp.read('/img/top.png')
const feature = await Jimp.read('/img/feature.png')
const constructed = await base
.clone()
.composite(
bottom
.color([
{apply: 'hue', params: [hue]},
{apply: 'saturate', params: [sat]}
]),
0,
0,
{ mode: Jimp.BLEND_SOURCE_OVER }
)
.composite(
middle
.color([
{apply: 'hue', params: [hue]},
{apply: 'saturate', params: [sat]}
]),
0,
0,
{ mode: Jimp.BLEND_SOURCE_OVER }
)
.composite(
top
feature
.color([
{apply: 'hue', params: [hue]},
{apply: 'saturate', params: [sat]}

Loading…
Cancel
Save