-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hello, I am trying to decompress uint16 geotiff images with four channels (BGR and NIR).
I tried:
decompressor = LZW('010219864010_01_assembly_final.tif')
decompressor.decompress()
but ran into the following error message:
File "C:\Users\el006794\AppData\Local\Continuum\anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 202: character maps to
If I set errors='ignore' in decompress(), I get:
...def decompress(self):
print("Decompressing File ...")
image = []
print("Before open")
with open(self.path,"r", errors='ignore') as file:...
File "C:\Users\el006794\MNIST classification\vessel-detection\LZW.py", line 84, in decompressRow
decodedRow = decodedRow + self.decompressionDictionary[int(currentRow[0])]
ValueError: invalid literal for int() with base 10: 'II*\x00\x08\x00\x00\x00\x15\x00\x00\x01\x03\x00\x01\x00\x00\x00õ#\x00\x00\x01\x01\x03\x00\x01\x00\x00\x00-\x13\x00\x00\x02\x01\x03\x00\x04\x00\x00\x00'
I get the same results with your images.