|
@@ -12,15 +12,14 @@ class Writer {
|
|
public function write( tif : TifFile ) {
|
|
public function write( tif : TifFile ) {
|
|
f.writeString("II");
|
|
f.writeString("II");
|
|
f.writeUInt16(42);
|
|
f.writeUInt16(42);
|
|
- var pos = 4;
|
|
|
|
|
|
+ var pos = 8;
|
|
var offsets = [], lengths = [];
|
|
var offsets = [], lengths = [];
|
|
for( d in tif.data ) {
|
|
for( d in tif.data ) {
|
|
offsets.push(pos);
|
|
offsets.push(pos);
|
|
lengths.push(d.length);
|
|
lengths.push(d.length);
|
|
pos += d.length;
|
|
pos += d.length;
|
|
}
|
|
}
|
|
- f.writeInt32(pos + 4);
|
|
|
|
- pos += 4;
|
|
|
|
|
|
+ f.writeInt32(pos);
|
|
|
|
|
|
var tags = tif.tags.copy();
|
|
var tags = tif.tags.copy();
|
|
for( d in tif.data )
|
|
for( d in tif.data )
|