1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-10 11:10:35 +02:00

Adding face testing for png #99

This commit is contained in:
Patrik J. Braun 2020-09-13 14:43:03 +02:00
parent f1d9fa0933
commit ffa7840626
3 changed files with 30 additions and 8 deletions

View File

@ -0,0 +1,28 @@
{
"faces": [
{
"box": {
"height": 18,
"left": 2.5,
"top": 8,
"width": 21
},
"name": "raspberry"
},
{
"box": {
"height": 7,
"left": 13.5,
"top": 0.5,
"width": 9
},
"name": "leaf"
}
]
"fileSize": 4381,
"orientation": 1,
"size": {
"height": 26,
"width": 26
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -8,14 +8,8 @@ describe('MetadataLoader', () => {
it('should load png', async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/test_png.png'));
delete data.creationDate; // creation time for png not supported
expect(Utils.clone(data)).to.be.deep.equal(Utils.clone({
fileSize: 2155,
orientation: 1,
size: {
height: 26,
width: 26
}
}));
const expected = require(path.join(__dirname, '/../../../assets/test_png.json'));
expect(Utils.clone(data)).to.be.deep.equal(expected);
});
it('should load jpg', async () => {