Fix: estimates geo v2

This commit is contained in:
Arsen
2026-02-04 00:11:19 +05:00
commit 3f0086f88e
22567 changed files with 4348823 additions and 0 deletions
+25082
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+113141
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+23
View File
@@ -0,0 +1,23 @@
const PNGNode = require('../png-node');
const fs = require('fs');
const files = fs.readdirSync('test/images');
function getImgData(Ctor, fileName) {
const image = new Ctor(fs.readFileSync(`test/images/${fileName}`));
return image.imgData;
}
describe('imgData', () => {
describe('node', () => {
test.each(files)('%s', fileName => {
expect(getImgData(PNGNode, fileName)).toMatchSnapshot();
});
});
describe('browser', () => {
test.each(files)('%s', fileName => {
expect(getImgData(PNG, fileName)).toMatchSnapshot();
});
});
});
+24
View File
@@ -0,0 +1,24 @@
const PNGNode = require('../png-node');
const fs = require('fs');
const files = fs.readdirSync('test/images');
function getMetaData(Ctor, fileName) {
const image = new Ctor(fs.readFileSync(`test/images/${fileName}`));
const { imgData, data, ...metadata } = image;
return metadata;
}
describe('metadata', () => {
describe('node', () => {
test.each(files)('%s', fileName => {
expect(getMetaData(PNGNode, fileName)).toMatchSnapshot();
});
});
describe('browser', () => {
test.each(files)('%s', fileName => {
expect(getMetaData(PNG, fileName)).toMatchSnapshot();
});
});
});
+1
View File
@@ -0,0 +1 @@
HTMLCanvasElement.prototype.getContext = function() {};
+29
View File
@@ -0,0 +1,29 @@
const PNGNode = require('../png-node');
const fs = require('fs');
const files = fs.readdirSync('test/images');
async function getPixels(Ctor, fileName) {
const image = new Ctor(fs.readFileSync(`test/images/${fileName}`));
return new Promise(resolve => {
Ctor === PNGNode
? image.decodePixels(resolve)
: resolve(image.decodePixels());
});
}
describe('pixels', () => {
describe('node', () => {
test.each(files)('%s', async fileName => {
const pixels = await getPixels(PNGNode, fileName);
expect(pixels).toMatchSnapshot();
});
});
describe('browser', () => {
test.each(files)('%s', async fileName => {
const pixels = await getPixels(PNG, fileName);
expect(pixels).toMatchSnapshot();
});
});
});