Delete some files

This commit is contained in:
cutls
2018-07-30 21:39:05 +09:00
parent 57e736b253
commit b3ff01188c
1172 changed files with 0 additions and 179456 deletions

View File

@@ -1,364 +0,0 @@
[
{
"ifdSection": 1,
"tagType": 271,
"value": "Nokia",
"format": 2
},
{
"ifdSection": 1,
"tagType": 272,
"value": "Lumia 820",
"format": 2
},
{
"ifdSection": 1,
"tagType": 274,
"value": [
1
],
"format": 3
},
{
"ifdSection": 1,
"tagType": 282,
"value": [
[
72,
1
]
],
"format": 5
},
{
"ifdSection": 1,
"tagType": 283,
"value": [
[
72,
1
]
],
"format": 5
},
{
"ifdSection": 1,
"tagType": 296,
"value": [
2
],
"format": 3
},
{
"ifdSection": 1,
"tagType": 305,
"value": "Windows Phone",
"format": 2
},
{
"ifdSection": 1,
"tagType": 531,
"value": [
1
],
"format": 3
},
{
"ifdSection": 1,
"tagType": 59932,
"value": "b:2060",
"format": 7
},
{
"ifdSection": 2,
"tagType": 259,
"value": [
6
],
"format": 3
},
{
"ifdSection": 2,
"tagType": 282,
"value": [
[
72,
1
]
],
"format": 5
},
{
"ifdSection": 2,
"tagType": 283,
"value": [
[
72,
1
]
],
"format": 5
},
{
"ifdSection": 2,
"tagType": 296,
"value": [
2
],
"format": 3
},
{
"ifdSection": 2,
"tagType": 513,
"value": [
12210
],
"format": 4
},
{
"ifdSection": 2,
"tagType": 514,
"value": [
18032
],
"format": 4
},
{
"ifdSection": 3,
"tagType": 0,
"value": [
2,
2,
0,
0
],
"format": 1
},
{
"ifdSection": 3,
"tagType": 1,
"value": "N",
"format": 2
},
{
"ifdSection": 3,
"tagType": 2,
"value": [
[
55,
1
],
[
2,
1
],
[
19521,
1000
]
],
"format": 5
},
{
"ifdSection": 3,
"tagType": 3,
"value": "E",
"format": 2
},
{
"ifdSection": 3,
"tagType": 4,
"value": [
[
8,
1
],
[
27,
1
],
[
25886,
1000
]
],
"format": 5
},
{
"ifdSection": 3,
"tagType": 5,
"value": [
0
],
"format": 1
},
{
"ifdSection": 3,
"tagType": 6,
"value": [
[
10000,
200000
]
],
"format": 5
},
{
"ifdSection": 3,
"tagType": 10,
"value": "3",
"format": 2
},
{
"ifdSection": 3,
"tagType": 11,
"value": [
[
10000,
80000
]
],
"format": 5
},
{
"ifdSection": 3,
"tagType": 59932,
"value": "b:2060",
"format": 7
},
{
"ifdSection": 5,
"tagType": 33434,
"value": [
[
3139,
1000000
]
],
"format": 5
},
{
"ifdSection": 5,
"tagType": 33437,
"value": [
[
220,
100
]
],
"format": 5
},
{
"ifdSection": 5,
"tagType": 34855,
"value": [
100
],
"format": 3
},
{
"ifdSection": 5,
"tagType": 36864,
"value": "b:4",
"format": 7
},
{
"ifdSection": 5,
"tagType": 36867,
"value": "2013:05:10 15:21:35",
"format": 2
},
{
"ifdSection": 5,
"tagType": 36868,
"value": "2013:05:10 15:21:35",
"format": 2
},
{
"ifdSection": 5,
"tagType": 37121,
"value": "b:4",
"format": 7
},
{
"ifdSection": 5,
"tagType": 37380,
"value": [
[
0,
6
]
],
"format": 10
},
{
"ifdSection": 5,
"tagType": 37385,
"value": [
24
],
"format": 3
},
{
"ifdSection": 5,
"tagType": 37500,
"value": "b:5243",
"format": 7
},
{
"ifdSection": 5,
"tagType": 40960,
"value": "b:4",
"format": 7
},
{
"ifdSection": 5,
"tagType": 40961,
"value": [
1
],
"format": 3
},
{
"ifdSection": 5,
"tagType": 40962,
"value": [
3552
],
"format": 4
},
{
"ifdSection": 5,
"tagType": 40963,
"value": [
2000
],
"format": 4
},
{
"ifdSection": 5,
"tagType": 59932,
"value": "b:2060",
"format": 7
},
{
"ifdSection": 5,
"tagType": 59933,
"value": [
12
],
"format": 9
},
{
"ifdSection": 5,
"tagType": 1,
"value": "R98",
"format": 2
},
{
"ifdSection": 5,
"tagType": 2,
"value": "b:4",
"format": 7
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB

View File

@@ -1,60 +0,0 @@
var date = require('../lib/date');
var minutes = 60;
var hours = minutes * 60;
var days = hours * 24;
var years = days * 365;
var leapYears = days * 366;
module.exports = {
'test parse unix epoch without timezone': function(test) {
var dateStr = '1970:01:01 00:00:00';
var timestamp = date.parseDateWithSpecFormat(dateStr);
test.strictEqual(timestamp, 0);
test.done();
},
'test parse given date without timezone': function(test) {
var dateStr = '1990:02:14 14:30:14';
var timestamp = date.parseDateWithSpecFormat(dateStr);
//between 1970 and 1990 there were 5 leap years: 1972, 1976, 1980, 1984, 1988
var expectedTimestamp = (15 * years) + (5 * leapYears) +
((31 + 13) * days) + (14 * hours) + (30 * minutes) + 14;
test.strictEqual(timestamp, expectedTimestamp);
test.done();
},
'test parse invalid date without timezone should not return anything': function(test) {
var dateStr = '1990:AA:14 14:30:14';
var timestamp = date.parseDateWithSpecFormat(dateStr);
test.strictEqual(timestamp, undefined);
test.done();
},
'test parse given date with timezone': function(test) {
var dateStr = '2004-09-04T23:39:06-08:00';
var timestamp = date.parseDateWithTimezoneFormat(dateStr);
var yearsFromEpoch = 2004 - 1970;
//1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000
var leapYearsCount = 8;
//2004 is a leap year as well, hence 29 days for february
var dayCount = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 3;
var expectedTimestamp = (yearsFromEpoch - leapYearsCount) * years +
leapYearsCount * leapYears +
dayCount * days +
23 * hours +
39 * minutes +
6 +
8 * hours; //for timezone
test.strictEqual(timestamp, expectedTimestamp);
test.done();
},
'test parse invalid date with timezone': function(test) {
var dateStr = '2004-09-04T23:39:06A08:00';
var timestamp = date.parseDateWithTimezoneFormat(dateStr);
test.strictEqual(timestamp, undefined);
test.done();
},
'test parseExifDate': function(test) {
test.strictEqual(date.parseExifDate('1970:01:01 00:00:00'), 0);
test.strictEqual(date.parseExifDate('1970-01-01T00:00:00-01:00'), 3600);
test.done();
}
}

View File

@@ -1,26 +0,0 @@
var testCase = require('nodeunit').testCase;
var exif = require('../lib/exif.js');
var BufferStream = require('../lib/bufferstream.js');
var buf = require('fs').readFileSync(__dirname + '/starfish.jpg');
module.exports = testCase({
"test parseTags": function(test) {
var expectedTags = require('./expected-exif-tags.json');
var index = 0;
exif.parseTags(new BufferStream(buf, 24, 23960), function(ifdSection, tagType, value, format) {
var t = expectedTags[index];
test.strictEqual(t.ifdSection, ifdSection);
test.strictEqual(t.tagType, tagType);
test.strictEqual(t.format, format);
if(typeof t.value === 'string' && t.value.indexOf('b:') === 0) {
test.ok(Buffer.isBuffer(value));
test.strictEqual(parseInt(t.value.substr(2), 10), value.length);
} else {
test.deepEqual(t.value, value);
}
++index;
});
test.strictEqual(index, expectedTags.length, 'all tags should be passed to the iterator');
test.done();
}
});

View File

@@ -1,46 +0,0 @@
var testCase = require('nodeunit').testCase;
var jpeg = require('../lib/jpeg.js');
var BufferStream = require('../lib/bufferstream.js');
var buf = require('fs').readFileSync(__dirname + '/test.jpg');
module.exports = testCase({
"test parseSections": function(test) {
var expectedSections = [
{ type: 216, offset: 2, len: 0 },
{ type: 224, offset: 6, len: 14 },
{ type: 226, offset: 24, len: 3158 },
{ type: 225, offset: 3186, len: 200 },
{ type: 225, offset: 3390, len: 374 },
{ type: 219, offset: 3768, len: 65 },
{ type: 219, offset: 3837, len: 65 },
{ type: 192, offset: 3906, len: 15 },
{ type: 196, offset: 3925, len: 29 },
{ type: 196, offset: 3958, len: 179 },
{ type: 196, offset: 4141, len: 29 },
{ type: 196, offset: 4174, len: 179 },
{ type: 218, offset: 4355, len: 0 }
];
var index = 0;
var jpegStream = new BufferStream(buf), start = jpegStream.mark();
jpeg.parseSections(jpegStream, function(type, sectionStream) {
test.strictEqual(type, expectedSections[index].type);
test.strictEqual(sectionStream.offsetFrom(start), expectedSections[index].offset);
test.strictEqual(sectionStream.remainingLength(), expectedSections[index].len);
++index;
});
test.strictEqual(index, expectedSections.length, 'all sections should be passed to the iterator');
test.done();
},
"test getSizeFromSOFSection": function(test) {
var size = jpeg.getSizeFromSOFSection(new BufferStream(buf, 3906, 15, true));
test.strictEqual(size.width, 2);
test.strictEqual(size.height, 1);
test.done();
},
"test getSectionName": function(test) {
test.deepEqual({name: 'SOI'}, jpeg.getSectionName(0xD8));
test.deepEqual({name: 'APP', index: 15}, jpeg.getSectionName(0xEF));
test.deepEqual({name: 'DHT'}, jpeg.getSectionName(0xC4));
test.done();
}
});

View File

@@ -1,24 +0,0 @@
var simplify = require('../lib/simplify');
module.exports = {
'test castDateValues': function(test) {
var values = {
'DateTimeOriginal': '1970:01:01 00:00:00',
'CreateDate': '1970-01-01T00:00:00-05:00',
'ModifyDate': '1970-01-01T00:00:00-05:00'
};
var setValues = {};
function getTagValue(tag) {
return values[tag.name];
}
function setTagValue(tag, value) {
setValues[tag.name] = value;
}
simplify.castDateValues(getTagValue, setTagValue);
test.strictEqual(Object.keys(setValues).length, 3);
test.strictEqual(setValues.DateTimeOriginal, 0);
test.strictEqual(setValues.CreateDate, 5 * 3600);
test.strictEqual(setValues.ModifyDate, 5 * 3600);
test.done();
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB