File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -295,8 +295,7 @@ class GeoTIFFImage {
295
295
}
296
296
297
297
getReaderForSample ( sampleIndex ) {
298
- const format = this . fileDirectory . SampleFormat
299
- ? this . fileDirectory . SampleFormat [ sampleIndex ] : 1 ;
298
+ const format = this . getSampleFormat ( sampleIndex ) ;
300
299
const bitsPerSample = this . fileDirectory . BitsPerSample [ sampleIndex ] ;
301
300
switch ( format ) {
302
301
case 1 : // unsigned integer data
@@ -339,7 +338,8 @@ class GeoTIFFImage {
339
338
340
339
getSampleFormat ( sampleIndex = 0 ) {
341
340
return this . fileDirectory . SampleFormat
342
- ? this . fileDirectory . SampleFormat [ sampleIndex ] : 1 ;
341
+ ? ( this . fileDirectory . SampleFormat [ sampleIndex ] ?? Math . max . apply ( null , this . fileDirectory . SampleFormat ) )
342
+ : 1 ;
343
343
}
344
344
345
345
getBitsPerSample ( sampleIndex = 0 ) {
You can’t perform that action at this time.
0 commit comments