-
Notifications
You must be signed in to change notification settings - Fork 30
/
tiff.js
710 lines (577 loc) · 19.3 KB
/
tiff.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function TIFFParser() {
this.tiffDataView = undefined;
this.littleEndian = undefined;
this.fileDirectories = [];
};
TIFFParser.prototype = {
isLittleEndian: function () {
// Get byte order mark.
var BOM = this.getBytes(2, 0);
// Find out the endianness.
if (BOM === 0x4949) {
this.littleEndian = true;
} else if (BOM === 0x4D4D) {
this.littleEndian = false;
} else {
console.log( BOM );
throw TypeError("Invalid byte order value.");
}
return this.littleEndian;
},
hasTowel: function () {
// Check for towel.
if (this.getBytes(2, 2) !== 42) {
throw RangeError("You forgot your towel!");
return false;
}
return true;
},
getFieldTagName: function (fieldTag) {
// See: http://www.digitizationguidelines.gov/guidelines/TIFF_Metadata_Final.pdf
// See: http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml
var fieldTagNames = {
// TIFF Baseline
0x013B: 'Artist',
0x0102: 'BitsPerSample',
0x0109: 'CellLength',
0x0108: 'CellWidth',
0x0140: 'ColorMap',
0x0103: 'Compression',
0x8298: 'Copyright',
0x0132: 'DateTime',
0x0152: 'ExtraSamples',
0x010A: 'FillOrder',
0x0121: 'FreeByteCounts',
0x0120: 'FreeOffsets',
0x0123: 'GrayResponseCurve',
0x0122: 'GrayResponseUnit',
0x013C: 'HostComputer',
0x010E: 'ImageDescription',
0x0101: 'ImageLength',
0x0100: 'ImageWidth',
0x010F: 'Make',
0x0119: 'MaxSampleValue',
0x0118: 'MinSampleValue',
0x0110: 'Model',
0x00FE: 'NewSubfileType',
0x0112: 'Orientation',
0x0106: 'PhotometricInterpretation',
0x011C: 'PlanarConfiguration',
0x0128: 'ResolutionUnit',
0x0116: 'RowsPerStrip',
0x0115: 'SamplesPerPixel',
0x0131: 'Software',
0x0117: 'StripByteCounts',
0x0111: 'StripOffsets',
0x00FF: 'SubfileType',
0x0107: 'Threshholding',
0x011A: 'XResolution',
0x011B: 'YResolution',
// TIFF Extended
0x0146: 'BadFaxLines',
0x0147: 'CleanFaxData',
0x0157: 'ClipPath',
0x0148: 'ConsecutiveBadFaxLines',
0x01B1: 'Decode',
0x01B2: 'DefaultImageColor',
0x010D: 'DocumentName',
0x0150: 'DotRange',
0x0141: 'HalftoneHints',
0x015A: 'Indexed',
0x015B: 'JPEGTables',
0x011D: 'PageName',
0x0129: 'PageNumber',
0x013D: 'Predictor',
0x013F: 'PrimaryChromaticities',
0x0214: 'ReferenceBlackWhite',
0x0153: 'SampleFormat',
0x022F: 'StripRowCounts',
0x014A: 'SubIFDs',
0x0124: 'T4Options',
0x0125: 'T6Options',
0x0145: 'TileByteCounts',
0x0143: 'TileLength',
0x0144: 'TileOffsets',
0x0142: 'TileWidth',
0x012D: 'TransferFunction',
0x013E: 'WhitePoint',
0x0158: 'XClipPathUnits',
0x011E: 'XPosition',
0x0211: 'YCbCrCoefficients',
0x0213: 'YCbCrPositioning',
0x0212: 'YCbCrSubSampling',
0x0159: 'YClipPathUnits',
0x011F: 'YPosition',
// EXIF
0x9202: 'ApertureValue',
0xA001: 'ColorSpace',
0x9004: 'DateTimeDigitized',
0x9003: 'DateTimeOriginal',
0x8769: 'Exif IFD',
0x9000: 'ExifVersion',
0x829A: 'ExposureTime',
0xA300: 'FileSource',
0x9209: 'Flash',
0xA000: 'FlashpixVersion',
0x829D: 'FNumber',
0xA420: 'ImageUniqueID',
0x9208: 'LightSource',
0x927C: 'MakerNote',
0x9201: 'ShutterSpeedValue',
0x9286: 'UserComment',
// IPTC
0x83BB: 'IPTC',
// ICC
0x8773: 'ICC Profile',
// XMP
0x02BC: 'XMP',
// GDAL
0xA480: 'GDAL_METADATA',
0xA481: 'GDAL_NODATA',
// Photoshop
0x8649: 'Photoshop',
};
var fieldTagName;
if (fieldTag in fieldTagNames) {
fieldTagName = fieldTagNames[fieldTag];
} else {
console.log( "Unknown Field Tag:", fieldTag);
fieldTagName = "Tag" + fieldTag;
}
return fieldTagName;
},
getFieldTypeName: function (fieldType) {
var fieldTypeNames = {
0x0001: 'BYTE',
0x0002: 'ASCII',
0x0003: 'SHORT',
0x0004: 'LONG',
0x0005: 'RATIONAL',
0x0006: 'SBYTE',
0x0007: 'UNDEFINED',
0x0008: 'SSHORT',
0x0009: 'SLONG',
0x000A: 'SRATIONAL',
0x000B: 'FLOAT',
0x000C: 'DOUBLE',
};
var fieldTypeName;
if (fieldType in fieldTypeNames) {
fieldTypeName = fieldTypeNames[fieldType];
}
return fieldTypeName;
},
getFieldTypeLength: function (fieldTypeName) {
var fieldTypeLength;
if (['BYTE', 'ASCII', 'SBYTE', 'UNDEFINED'].indexOf(fieldTypeName) !== -1) {
fieldTypeLength = 1;
} else if (['SHORT', 'SSHORT'].indexOf(fieldTypeName) !== -1) {
fieldTypeLength = 2;
} else if (['LONG', 'SLONG', 'FLOAT'].indexOf(fieldTypeName) !== -1) {
fieldTypeLength = 4;
} else if (['RATIONAL', 'SRATIONAL', 'DOUBLE'].indexOf(fieldTypeName) !== -1) {
fieldTypeLength = 8;
}
return fieldTypeLength;
},
getBits: function (numBits, byteOffset, bitOffset) {
bitOffset = bitOffset || 0;
var extraBytes = Math.floor(bitOffset / 8);
var newByteOffset = byteOffset + extraBytes;
var totalBits = bitOffset + numBits;
var shiftRight = 32 - numBits;
if (totalBits <= 0) {
console.log( numBits, byteOffset, bitOffset );
throw RangeError("No bits requested");
} else if (totalBits <= 8) {
var shiftLeft = 24 + bitOffset;
var rawBits = this.tiffDataView.getUint8(newByteOffset, this.littleEndian);
} else if (totalBits <= 16) {
var shiftLeft = 16 + bitOffset;
var rawBits = this.tiffDataView.getUint16(newByteOffset, this.littleEndian);
} else if (totalBits <= 32) {
var shiftLeft = bitOffset;
var rawBits = this.tiffDataView.getUint32(newByteOffset, this.littleEndian);
} else {
console.log( numBits, byteOffset, bitOffset );
throw RangeError("Too many bits requested");
}
var chunkInfo = {
'bits': ((rawBits << shiftLeft) >>> shiftRight),
'byteOffset': newByteOffset + Math.floor(totalBits / 8),
'bitOffset': totalBits % 8,
};
return chunkInfo;
},
getBytes: function (numBytes, offset) {
if (numBytes <= 0) {
console.log( numBytes, offset );
throw RangeError("No bytes requested");
} else if (numBytes <= 1) {
return this.tiffDataView.getUint8(offset, this.littleEndian);
} else if (numBytes <= 2) {
return this.tiffDataView.getUint16(offset, this.littleEndian);
} else if (numBytes <= 3) {
return this.tiffDataView.getUint32(offset, this.littleEndian) >>> 8;
} else if (numBytes <= 4) {
return this.tiffDataView.getUint32(offset, this.littleEndian);
} else {
console.log( numBytes, offset );
throw RangeError("Too many bytes requested");
}
},
getFieldValues: function (fieldTagName, fieldTypeName, typeCount, valueOffset) {
var fieldValues = [];
var fieldTypeLength = this.getFieldTypeLength(fieldTypeName);
var fieldValueSize = fieldTypeLength * typeCount;
if (fieldValueSize <= 4) {
// The value is stored at the big end of the valueOffset.
if (this.littleEndian === false) {
var value = valueOffset >>> ((4 - fieldTypeLength) * 8);
} else {
var value = valueOffset;
}
fieldValues.push(value);
} else {
for (var i = 0; i < typeCount; i++) {
var indexOffset = fieldTypeLength * i;
if (fieldTypeLength >= 8) {
if (['RATIONAL', 'SRATIONAL'].indexOf(fieldTypeName) !== -1) {
// Numerator
fieldValues.push(this.getBytes(4, valueOffset + indexOffset));
// Denominator
fieldValues.push(this.getBytes(4, valueOffset + indexOffset + 4));
// } else if (['DOUBLE'].indexOf(fieldTypeName) !== -1) {
// fieldValues.push(this.getBytes(4, valueOffset + indexOffset) + this.getBytes(4, valueOffset + indexOffset + 4));
} else {
console.log( fieldTypeName, typeCount, fieldValueSize );
throw TypeError("Can't handle this field type or size");
}
} else {
fieldValues.push(this.getBytes(fieldTypeLength, valueOffset + indexOffset));
}
}
}
if (fieldTypeName === 'ASCII') {
fieldValues.forEach(function(e, i, a) { a[i] = String.fromCharCode(e); });
}
return fieldValues;
},
clampColorSample: function(colorSample, bitsPerSample) {
var multiplier = Math.pow(2, 8 - bitsPerSample);
return Math.floor((colorSample * multiplier) + (multiplier - 1));
},
makeRGBAFillValue: function(r, g, b, a) {
if(typeof a === 'undefined') {
a = 1.0;
}
return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
},
parseFileDirectory: function (byteOffset) {
var numDirEntries = this.getBytes(2, byteOffset);
var tiffFields = [];
for (var i = byteOffset + 2, entryCount = 0; entryCount < numDirEntries; i += 12, entryCount++) {
var fieldTag = this.getBytes(2, i);
var fieldType = this.getBytes(2, i + 2);
var typeCount = this.getBytes(4, i + 4);
var valueOffset = this.getBytes(4, i + 8);
var fieldTagName = this.getFieldTagName( fieldTag );
var fieldTypeName = this.getFieldTypeName( fieldType );
var fieldValues = this.getFieldValues(fieldTagName, fieldTypeName, typeCount, valueOffset);
tiffFields[fieldTagName] = { 'type': fieldTypeName, 'values': fieldValues };
}
this.fileDirectories.push( tiffFields );
var nextIFDByteOffset = this.getBytes(4, i);
if (nextIFDByteOffset === 0x00000000) {
return this.fileDirectories;
} else {
return this.parseFileDirectory(nextIFDByteOffset);
}
},
parseTIFF: function (tiffArrayBuffer, canvas) {
canvas = canvas || document.createElement('canvas');
this.tiffDataView = new DataView(tiffArrayBuffer);
this.canvas = canvas;
this.littleEndian = this.isLittleEndian(this.tiffDataView);
if (!this.hasTowel(this.tiffDataView, this.littleEndian)) {
return;
}
var firstIFDByteOffset = this.getBytes(4, 4);
this.fileDirectories = this.parseFileDirectory(firstIFDByteOffset);
var fileDirectory = this.fileDirectories[0];
console.log( fileDirectory );
var imageWidth = fileDirectory.ImageWidth.values[0];
var imageLength = fileDirectory.ImageLength.values[0];
this.canvas.width = imageWidth;
this.canvas.height = imageLength;
var strips = [];
var compression = (fileDirectory.Compression) ? fileDirectory.Compression.values[0] : 1;
var samplesPerPixel = fileDirectory.SamplesPerPixel.values[0];
var sampleProperties = [];
var bitsPerPixel = 0;
var hasBytesPerPixel = false;
fileDirectory.BitsPerSample.values.forEach(function(bitsPerSample, i, bitsPerSampleValues) {
sampleProperties[i] = {
'bitsPerSample': bitsPerSample,
'hasBytesPerSample': false,
'bytesPerSample': undefined,
};
if ((bitsPerSample % 8) === 0) {
sampleProperties[i].hasBytesPerSample = true;
sampleProperties[i].bytesPerSample = bitsPerSample / 8;
}
bitsPerPixel += bitsPerSample;
}, this);
if ((bitsPerPixel % 8) === 0) {
hasBytesPerPixel = true;
var bytesPerPixel = bitsPerPixel / 8;
}
var stripOffsetValues = fileDirectory.StripOffsets.values;
var numStripOffsetValues = stripOffsetValues.length;
// StripByteCounts is supposed to be required, but see if we can recover anyway.
if (fileDirectory.StripByteCounts) {
var stripByteCountValues = fileDirectory.StripByteCounts.values;
} else {
console.log("Missing StripByteCounts!");
// Infer StripByteCounts, if possible.
if (numStripOffsetValues === 1) {
var stripByteCountValues = [Math.ceil((imageWidth * imageLength * bitsPerPixel) / 8)];
} else {
throw Error("Cannot recover from missing StripByteCounts");
}
}
// Loop through strips and decompress as necessary.
for (var i = 0; i < numStripOffsetValues; i++) {
var stripOffset = stripOffsetValues[i];
strips[i] = [];
var stripByteCount = stripByteCountValues[i];
// Loop through pixels.
for (var byteOffset = 0, bitOffset = 0, jIncrement = 1, getHeader = true, pixel = [], numBytes = 0, sample = 0, currentSample = 0; byteOffset < stripByteCount; byteOffset += jIncrement) {
// Decompress strip.
switch (compression) {
// Uncompressed
case 1:
// Loop through samples (sub-pixels).
for (var m = 0, pixel = []; m < samplesPerPixel; m++) {
if (sampleProperties[m].hasBytesPerSample) {
// XXX: This is wrong!
var sampleOffset = sampleProperties[m].bytesPerSample * m;
pixel.push(this.getBytes(sampleProperties[m].bytesPerSample, stripOffset + byteOffset + sampleOffset));
} else {
var sampleInfo = this.getBits(sampleProperties[m].bitsPerSample, stripOffset + byteOffset, bitOffset);
pixel.push(sampleInfo.bits);
byteOffset = sampleInfo.byteOffset - stripOffset;
bitOffset = sampleInfo.bitOffset;
throw RangeError("Cannot handle sub-byte bits per sample");
}
}
strips[i].push(pixel);
if (hasBytesPerPixel) {
jIncrement = bytesPerPixel;
} else {
jIncrement = 0;
throw RangeError("Cannot handle sub-byte bits per pixel");
}
break;
// CITT Group 3 1-Dimensional Modified Huffman run-length encoding
case 2:
// XXX: Use PDF.js code?
break;
// Group 3 Fax
case 3:
// XXX: Use PDF.js code?
break;
// Group 4 Fax
case 4:
// XXX: Use PDF.js code?
break;
// LZW
case 5:
// XXX: Use PDF.js code?
break;
// Old-style JPEG (TIFF 6.0)
case 6:
// XXX: Use PDF.js code?
break;
// New-style JPEG (TIFF Specification Supplement 2)
case 7:
// XXX: Use PDF.js code?
break;
// PackBits
case 32773:
// Are we ready for a new block?
if (getHeader) {
getHeader = false;
var blockLength = 1;
var iterations = 1;
// The header byte is signed.
var header = this.tiffDataView.getInt8(stripOffset + byteOffset, this.littleEndian);
if ((header >= 0) && (header <= 127)) { // Normal pixels.
blockLength = header + 1;
} else if ((header >= -127) && (header <= -1)) { // Collapsed pixels.
iterations = -header + 1;
} else /*if (header === -128)*/ { // Placeholder byte?
getHeader = true;
}
} else {
var currentByte = this.getBytes(1, stripOffset + byteOffset);
// Duplicate bytes, if necessary.
for (var m = 0; m < iterations; m++) {
if (sampleProperties[sample].hasBytesPerSample) {
// We're reading one byte at a time, so we need to handle multi-byte samples.
currentSample = (currentSample << (8 * numBytes)) | currentByte;
numBytes++;
// Is our sample complete?
if (numBytes === sampleProperties[sample].bytesPerSample) {
pixel.push(currentSample);
currentSample = numBytes = 0;
sample++;
}
} else {
throw RangeError("Cannot handle sub-byte bits per sample");
}
// Is our pixel complete?
if (sample === samplesPerPixel)
{
strips[i].push(pixel);
pixel = [];
sample = 0;
}
}
blockLength--;
// Is our block complete?
if (blockLength === 0) {
getHeader = true;
}
}
jIncrement = 1;
break;
// Unknown compression algorithm
default:
// Do not attempt to parse the image data.
break;
}
}
// console.log( strips[i] );
}
// console.log( strips );
if (canvas.getContext) {
var ctx = this.canvas.getContext("2d");
// Set a default fill style.
ctx.fillStyle = this.makeRGBAFillValue(255, 255, 255, 0);
// If RowsPerStrip is missing, the whole image is in one strip.
if (fileDirectory.RowsPerStrip) {
var rowsPerStrip = fileDirectory.RowsPerStrip.values[0];
} else {
var rowsPerStrip = imageLength;
}
var numStrips = strips.length;
var imageLengthModRowsPerStrip = imageLength % rowsPerStrip;
var rowsInLastStrip = (imageLengthModRowsPerStrip === 0) ? rowsPerStrip : imageLengthModRowsPerStrip;
var numRowsInStrip = rowsPerStrip;
var numRowsInPreviousStrip = 0;
var photometricInterpretation = fileDirectory.PhotometricInterpretation.values[0];
var extraSamplesValues = [];
var numExtraSamples = 0;
if (fileDirectory.ExtraSamples) {
extraSamplesValues = fileDirectory.ExtraSamples.values;
numExtraSamples = extraSamplesValues.length;
}
if (fileDirectory.ColorMap) {
var colorMapValues = fileDirectory.ColorMap.values;
var colorMapSampleSize = Math.pow(2, sampleProperties[0].bitsPerSample);
}
// Loop through the strips in the image.
for (var i = 0; i < numStrips; i++) {
// The last strip may be short.
if ((i + 1) === numStrips) {
numRowsInStrip = rowsInLastStrip;
}
var numPixels = strips[i].length;
var yPadding = numRowsInPreviousStrip * i;
// Loop through the rows in the strip.
for (var y = 0, j = 0; y < numRowsInStrip, j < numPixels; y++) {
// Loop through the pixels in the row.
for (var x = 0; x < imageWidth; x++, j++) {
var pixelSamples = strips[i][j];
var red = 0;
var green = 0;
var blue = 0;
var opacity = 1.0;
if (numExtraSamples > 0) {
for (var k = 0; k < numExtraSamples; k++) {
if (extraSamplesValues[k] === 1 || extraSamplesValues[k] === 2) {
// Clamp opacity to the range [0,1].
opacity = pixelSamples[3 + k] / 256;
break;
}
}
}
switch (photometricInterpretation) {
// Bilevel or Grayscale
// WhiteIsZero
case 0:
if (sampleProperties[0].hasBytesPerSample) {
var invertValue = Math.pow(0x10, sampleProperties[0].bytesPerSample * 2);
}
// Invert samples.
pixelSamples.forEach(function(sample, index, samples) { samples[index] = invertValue - sample; });
// Bilevel or Grayscale
// BlackIsZero
case 1:
red = green = blue = this.clampColorSample(pixelSamples[0], sampleProperties[0].bitsPerSample);
break;
// RGB Full Color
case 2:
red = this.clampColorSample(pixelSamples[0], sampleProperties[0].bitsPerSample);
green = this.clampColorSample(pixelSamples[1], sampleProperties[1].bitsPerSample);
blue = this.clampColorSample(pixelSamples[2], sampleProperties[2].bitsPerSample);
break;
// RGB Color Palette
case 3:
if (colorMapValues === undefined) {
throw Error("Palette image missing color map");
}
var colorMapIndex = pixelSamples[0];
red = this.clampColorSample(colorMapValues[colorMapIndex], 16);
green = this.clampColorSample(colorMapValues[colorMapSampleSize + colorMapIndex], 16);
blue = this.clampColorSample(colorMapValues[(2 * colorMapSampleSize) + colorMapIndex], 16);
break;
// Transparency mask
case 4:
throw RangeError( 'Not Yet Implemented: Transparency mask' );
break;
// CMYK
case 5:
throw RangeError( 'Not Yet Implemented: CMYK' );
break;
// YCbCr
case 6:
throw RangeError( 'Not Yet Implemented: YCbCr' );
break;
// CIELab
case 8:
throw RangeError( 'Not Yet Implemented: CIELab' );
break;
// Unknown Photometric Interpretation
default:
throw RangeError( 'Unknown Photometric Interpretation:', photometricInterpretation );
break;
}
ctx.fillStyle = this.makeRGBAFillValue(red, green, blue, opacity);
ctx.fillRect(x, yPadding + y, 1, 1);
}
}
numRowsInPreviousStrip = numRowsInStrip;
}
}
/* for (var i = 0, numFileDirectories = this.fileDirectories.length; i < numFileDirectories; i++) {
// Stuff
}*/
return this.canvas;
},
}