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 {
295295 }
296296
297297 getReaderForSample ( sampleIndex ) {
298- const format = this . fileDirectory . SampleFormat
299- ? this . fileDirectory . SampleFormat [ sampleIndex ] : 1 ;
298+ const format = this . getSampleFormat ( sampleIndex ) ;
300299 const bitsPerSample = this . fileDirectory . BitsPerSample [ sampleIndex ] ;
301300 switch ( format ) {
302301 case 1 : // unsigned integer data
@@ -339,7 +338,8 @@ class GeoTIFFImage {
339338
340339 getSampleFormat ( sampleIndex = 0 ) {
341340 return this . fileDirectory . SampleFormat
342- ? this . fileDirectory . SampleFormat [ sampleIndex ] : 1 ;
341+ ? ( this . fileDirectory . SampleFormat [ sampleIndex ] ?? Math . max . apply ( null , this . fileDirectory . SampleFormat ) )
342+ : 1 ;
343343 }
344344
345345 getBitsPerSample ( sampleIndex = 0 ) {
You can’t perform that action at this time.
0 commit comments