mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
Fix
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "116.24.0",
|
"version": "116.24.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ module.exports = class CanvasUtil {
|
|||||||
const data = ctx.getImageData(x, y, width, height);
|
const data = ctx.getImageData(x, y, width, height);
|
||||||
for (let i = 0; i < height; i++) {
|
for (let i = 0; i < height; i++) {
|
||||||
for (let j = 0; j < width; j++) {
|
for (let j = 0; j < width; j++) {
|
||||||
const dest = ((j * width) + i) * 4;
|
const dest = ((i * width) + j) * 4;
|
||||||
const grey = Number.parseInt(
|
const grey = Number.parseInt(
|
||||||
(0.2125 * data.data[dest]) + (0.7154 * data.data[dest + 1]) + (0.0721 * data.data[dest + 2]), 10
|
(0.2125 * data.data[dest]) + (0.7154 * data.data[dest + 1]) + (0.0721 * data.data[dest + 2]), 10
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user