- Move served planet (animated webp, posters, 300 frames) and team mascots into src/assets/ - Use relative paths (assets/...) that work in file://, on the dev server and with docroot=src - Screenshot pipeline writes to src/assets/projects - Halo audit: report and measurements, ticker ring fix, shadow rules in DESIGN.md and spec.md
10 lines
447 B
JavaScript
10 lines
447 B
JavaScript
const fs = require('fs');
|
|
const png = require('./png.cjs');
|
|
const img = png.decode(fs.readFileSync(process.argv[2]));
|
|
let mn = 255, mx = 0;
|
|
for (let i = 0; i < img.data.length; i++) { const v = img.data[i]; if (v < mn) mn = v; if (v > mx) mx = v; }
|
|
console.log('size', img.width, img.height, 'min', mn, 'max', mx);
|
|
for (const [x, y] of [[0, 0], [10, 10], [100, 100], [img.width >> 1, img.height >> 1]]) {
|
|
console.log(x, y, png.px(img, x, y));
|
|
}
|