File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,15 @@ public static IReadOnlyList<Directory> ReadMetadata(string filePath)
35
35
/// <exception cref="TiffProcessingException"/>
36
36
public static IReadOnlyList < Directory > ReadMetadata ( Stream stream )
37
37
{
38
- // TIFF processing requires random access, as directories can be scattered throughout the byte sequence.
39
- // Stream does not support seeking backwards, so we wrap it with IndexedCapturingReader, which
40
- // buffers data from the stream as we seek forward.
41
38
var directories = new List < Directory > ( ) ;
42
39
43
40
var handler = new ExifTiffHandler ( directories , exifStartOffset : 0 ) ;
44
41
42
+ // TIFF processing requires random access, as directories can be scattered throughout the byte sequence.
43
+ // Stream does not support seeking backwards, so we wrap it with IndexedCapturingReader, which
44
+ // buffers data from the stream as we seek forward.
45
45
using var reader = new IndexedCapturingReader ( stream ) ;
46
+
46
47
TiffReader . ProcessTiff ( reader , handler ) ;
47
48
48
49
return directories ;
You can’t perform that action at this time.
0 commit comments