Skip to content

Bug Report: Cannot Open TIFF Images in Image Viewer #21

@AhmedFatthy1040

Description

@AhmedFatthy1040

When uploading TIFF images (of any size), they are successfully uploaded and appear in the gallery. However, when clicking on any TIFF image to open it for annotation/viewing, the image fails to load.

Steps to Reproduce

  1. Launch the Satellite Image Annotation Tool
  2. Click "Upload Image" and select a TIFF file
  3. Wait for the upload to complete successfully
  4. Observe that the TIFF image appears in the gallery
  5. Click on the image to open it for annotation

Expected Behavior

The TIFF image should load in the image viewer component, allowing for annotation using the SAM model.

Actual Behavior

The image fails to load in the viewer. An error message appears: "Failed to load image. Make sure the backend is running and serving images correctly."

Frontend error

Error: Failed to load image. Make sure the backend is running and serving images correctly.

Backend logs

(venv) PS D:\Programming Projects\sat-annotator> uvicorn app.main:app --reload
INFO:     Will watch for changes in these directories: ['D:\\Programming Projects\\sat-annotator']
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [22908] using StatReload
INFO:     Started server process [10592]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     127.0.0.1:55802 - "GET /api/images/ HTTP/1.1" 200 OK
INFO:     127.0.0.1:55804 - "GET /api/images/ HTTP/1.1" 200 OK
2025-04-23 23:20:40,753 - python_multipart.multipart - DEBUG - Calling on_part_begin with no data
2025-04-23 23:20:40,754 - python_multipart.multipart - DEBUG - Calling on_header_field with data[42:61]
2025-04-23 23:20:40,754 - python_multipart.multipart - DEBUG - Calling on_header_value with data[63:106]
2025-04-23 23:20:40,754 - python_multipart.multipart - DEBUG - Calling on_header_end with no data
2025-04-23 23:20:40,754 - python_multipart.multipart - DEBUG - Calling on_header_field with data[108:120]
2025-04-23 23:20:40,754 - python_multipart.multipart - DEBUG - Calling on_header_value with data[122:132]
2025-04-23 23:20:40,755 - python_multipart.multipart - DEBUG - Calling on_header_end with no data
2025-04-23 23:20:40,755 - python_multipart.multipart - DEBUG - Calling on_headers_finished with no data
2025-04-23 23:20:40,755 - python_multipart.multipart - DEBUG - Calling on_part_data with data[136:32768]
2025-04-23 23:20:40,756 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,757 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,758 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,758 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:131072]
2025-04-23 23:20:40,760 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,765 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,767 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,769 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,770 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,771 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,772 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:163840]
2025-04-23 23:20:40,777 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:65536]
2025-04-23 23:20:40,778 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:131072]
2025-04-23 23:20:40,780 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:196608]
2025-04-23 23:20:40,781 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,782 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,784 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,786 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,787 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,789 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,790 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,792 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,794 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,795 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,796 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,797 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,800 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,801 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,803 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,805 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,806 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,808 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,809 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,811 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,813 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,814 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,815 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,817 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,818 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,820 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,821 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,823 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,824 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,826 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,827 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,829 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,830 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,832 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,833 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,835 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,836 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,838 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,840 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,842 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,843 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,845 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,846 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,848 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,849 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,850 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,852 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,854 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,855 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,856 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,859 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,860 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,862 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,863 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,865 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,866 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,907 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,908 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,910 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,912 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,913 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,915 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,916 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,917 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,917 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:16384]
2025-04-23 23:20:40,935 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:65536]
2025-04-23 23:20:40,936 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:131072]
2025-04-23 23:20:40,937 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,939 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,940 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,941 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,942 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,944 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,946 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,947 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,950 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,952 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,954 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,955 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,957 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,959 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,960 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,962 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,964 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,966 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,967 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,969 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:131072]
2025-04-23 23:20:40,971 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,973 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,974 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,976 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,978 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,979 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,981 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,982 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,984 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,985 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,987 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,989 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,990 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,991 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,993 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,995 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,996 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,998 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,999 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:40,999 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:41,000 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:262144]
2025-04-23 23:20:41,001 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:131072]
2025-04-23 23:20:41,010 - python_multipart.multipart - DEBUG - Calling on_part_data with data[0:36759]
2025-04-23 23:20:41,010 - python_multipart.multipart - DEBUG - Calling on_part_end with no data
2025-04-23 23:20:41,011 - python_multipart.multipart - DEBUG - Calling on_end with no data
2025-04-23 23:20:41,266 - PIL.Image - DEBUG - Importing AvifImagePlugin
2025-04-23 23:20:41,267 - PIL.Image - DEBUG - Importing BlpImagePlugin
2025-04-23 23:20:41,287 - PIL.Image - DEBUG - Importing BmpImagePlugin
2025-04-23 23:20:41,287 - PIL.Image - DEBUG - Importing BufrStubImagePlugin
2025-04-23 23:20:41,298 - PIL.Image - DEBUG - Importing CurImagePlugin
2025-04-23 23:20:41,299 - PIL.Image - DEBUG - Importing DcxImagePlugin
2025-04-23 23:20:41,302 - PIL.Image - DEBUG - Importing DdsImagePlugin
2025-04-23 23:20:41,306 - PIL.Image - DEBUG - Importing EpsImagePlugin
2025-04-23 23:20:41,307 - PIL.Image - DEBUG - Importing FitsImagePlugin
2025-04-23 23:20:41,309 - PIL.Image - DEBUG - Importing FliImagePlugin
2025-04-23 23:20:41,311 - PIL.Image - DEBUG - Importing FpxImagePlugin
2025-04-23 23:20:41,313 - PIL.Image - DEBUG - Image: failed to import FpxImagePlugin: No module named 'olefile'
2025-04-23 23:20:41,313 - PIL.Image - DEBUG - Importing FtexImagePlugin
2025-04-23 23:20:41,314 - PIL.Image - DEBUG - Importing GbrImagePlugin
2025-04-23 23:20:41,317 - PIL.Image - DEBUG - Importing GifImagePlugin
2025-04-23 23:20:41,317 - PIL.Image - DEBUG - Importing GribStubImagePlugin
2025-04-23 23:20:41,318 - PIL.Image - DEBUG - Importing Hdf5StubImagePlugin
2025-04-23 23:20:41,320 - PIL.Image - DEBUG - Importing IcnsImagePlugin
2025-04-23 23:20:41,322 - PIL.Image - DEBUG - Importing IcoImagePlugin
2025-04-23 23:20:41,324 - PIL.Image - DEBUG - Importing ImImagePlugin
2025-04-23 23:20:41,326 - PIL.Image - DEBUG - Importing ImtImagePlugin
2025-04-23 23:20:41,328 - PIL.Image - DEBUG - Importing IptcImagePlugin
2025-04-23 23:20:41,329 - PIL.Image - DEBUG - Importing JpegImagePlugin
2025-04-23 23:20:41,329 - PIL.Image - DEBUG - Importing Jpeg2KImagePlugin
2025-04-23 23:20:41,329 - PIL.Image - DEBUG - Importing McIdasImagePlugin
2025-04-23 23:20:41,331 - PIL.Image - DEBUG - Importing MicImagePlugin
2025-04-23 23:20:41,333 - PIL.Image - DEBUG - Image: failed to import MicImagePlugin: No module named 'olefile'
2025-04-23 23:20:41,333 - PIL.Image - DEBUG - Importing MpegImagePlugin
2025-04-23 23:20:41,334 - PIL.Image - DEBUG - Importing MpoImagePlugin
2025-04-23 23:20:41,344 - PIL.Image - DEBUG - Importing MspImagePlugin
2025-04-23 23:20:41,346 - PIL.Image - DEBUG - Importing PalmImagePlugin
2025-04-23 23:20:41,378 - PIL.Image - DEBUG - Importing PcdImagePlugin
2025-04-23 23:20:41,381 - PIL.Image - DEBUG - Importing PcxImagePlugin
2025-04-23 23:20:41,381 - PIL.Image - DEBUG - Importing PdfImagePlugin
2025-04-23 23:20:41,389 - PIL.Image - DEBUG - Importing PixarImagePlugin
2025-04-23 23:20:41,390 - PIL.Image - DEBUG - Importing PngImagePlugin
2025-04-23 23:20:41,390 - PIL.Image - DEBUG - Importing PpmImagePlugin
2025-04-23 23:20:41,390 - PIL.Image - DEBUG - Importing PsdImagePlugin
2025-04-23 23:20:41,392 - PIL.Image - DEBUG - Importing QoiImagePlugin
2025-04-23 23:20:41,394 - PIL.Image - DEBUG - Importing SgiImagePlugin
2025-04-23 23:20:41,395 - PIL.Image - DEBUG - Importing SpiderImagePlugin
2025-04-23 23:20:41,397 - PIL.Image - DEBUG - Importing SunImagePlugin
2025-04-23 23:20:41,398 - PIL.Image - DEBUG - Importing TgaImagePlugin
2025-04-23 23:20:41,400 - PIL.Image - DEBUG - Importing TiffImagePlugin
2025-04-23 23:20:41,401 - PIL.Image - DEBUG - Importing WebPImagePlugin
2025-04-23 23:20:41,432 - PIL.Image - DEBUG - Importing WmfImagePlugin
2025-04-23 23:20:41,434 - PIL.Image - DEBUG - Importing XbmImagePlugin
2025-04-23 23:20:41,436 - PIL.Image - DEBUG - Importing XpmImagePlugin
2025-04-23 23:20:41,437 - PIL.Image - DEBUG - Importing XVThumbImagePlugin
2025-04-23 23:20:41,440 - PIL.TiffImagePlugin - DEBUG - *** TiffImageFile._open ***
2025-04-23 23:20:41,440 - PIL.TiffImagePlugin - DEBUG - - __first: 8
2025-04-23 23:20:41,440 - PIL.TiffImagePlugin - DEBUG - - ifh: b'II*\x00\x08\x00\x00\x00'
2025-04-23 23:20:41,440 - PIL.TiffImagePlugin - DEBUG - Seeking to frame 0, on frame -1, __next 8, location: 8
2025-04-23 23:20:41,441 - PIL.TiffImagePlugin - DEBUG - Loading tags, location: 8
2025-04-23 23:20:41,441 - PIL.TiffImagePlugin - DEBUG - tag: ImageWidth (256) - type: short (3) - value: b'{\x0c'
2025-04-23 23:20:41,441 - PIL.TiffImagePlugin - DEBUG - tag: ImageLength (257) - type: short (3) - value: b'\x8f\x0c'
2025-04-23 23:20:41,441 - PIL.TiffImagePlugin - DEBUG - tag: BitsPerSample (258) - type: short (3) Tag Location: 46 - Data Location: 230 - value: b'\x08\x00\x08\x00\x08\x00'
2025-04-23 23:20:41,441 - PIL.TiffImagePlugin - DEBUG - tag: Compression (259) - type: short (3) - value: b'\x01\x00'
2025-04-23 23:20:41,441 - PIL.TiffImagePlugin - DEBUG - tag: PhotometricInterpretation (262) - type: short (3) - value: b'\x02\x00'
2025-04-23 23:20:41,442 - PIL.TiffImagePlugin - DEBUG - tag: StripOffsets (273) - type: long (4) Tag Location: 82 - Data Location: 19532 - value: <table: 19296 bytes>
2025-04-23 23:20:41,442 - PIL.TiffImagePlugin - DEBUG - tag: SamplesPerPixel (277) - type: short (3) - value: b'\x03\x00'
2025-04-23 23:20:41,442 - PIL.TiffImagePlugin - DEBUG - tag: RowsPerStrip (278) - type: short (3) - value: b'\x02\x00'
2025-04-23 23:20:41,442 - PIL.TiffImagePlugin - DEBUG - tag: StripByteCounts (279) - type: long (4) Tag Location: 118 - Data Location: 236 - value: <table: 19296 bytes>
2025-04-23 23:20:41,443 - PIL.TiffImagePlugin - DEBUG - tag: PlanarConfiguration (284) - type: short (3) - value: b'\x02\x00'
2025-04-23 23:20:41,443 - PIL.TiffImagePlugin - DEBUG - tag: SampleFormat (339) - type: short (3) Tag Location: 142 - Data Location: 38828 - value: b'\x01\x00\x01\x00\x01\x00'
2025-04-23 23:20:41,443 - PIL.TiffImagePlugin - DEBUG - tag: ModelPixelScaleTag (33550) - type: double (12) Tag Location: 154 - Data Location: 38992 - value: b'\x17\x07m[\x91\x9c\xc7>\x17\x07m[\x91\x9c\xc7>\x00\x00\x00\x00\x00\x00\x00\x00'
2025-04-23 23:20:41,443 - PIL.TiffImagePlugin - DEBUG - tag: ModelTiepointTag (33922) - type: double (12) Tag Location: 166 - Data Location: 39016 - value: <table: 48 bytes>
2025-04-23 23:20:41,443 - PIL.TiffImagePlugin - DEBUG - tag: GeoKeyDirectoryTag (34735) - type: short (3) Tag Location: 178 - Data Location: 39064 - value: <table: 64 bytes>
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: GeoDoubleParamsTag (34736) - type: double (12) Tag Location: 190 - Data Location: 39128 - value: b'\x88mt\x96\x1d\xa4r@\x00\x00\x00@\xa6TXA'
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: GeoAsciiParamsTag (34737) - type: string (2) Tag Location: 202 - Data Location: 39144 - value: b'WGS 84|\x00'
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: GDAL_METADATA (42112) - type: string (2) Tag Location: 214 - Data Location: 38834 - value: <table: 158 bytes>
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: GDAL_NODATA (42113) - type: string (2) - value: b'0\x00'
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: ImageWidth (256) - type: short (3) - value: b'{\x0c'
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: ImageLength (257) - type: short (3) - value: b'\x8f\x0c'
2025-04-23 23:20:41,444 - PIL.TiffImagePlugin - DEBUG - tag: BitsPerSample (258) - type: short (3) Tag Location: 46 - Data Location: 230 - value: b'\x08\x00\x08\x00\x08\x00'
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: Compression (259) - type: short (3) - value: b'\x01\x00'
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: PhotometricInterpretation (262) - type: short (3) - value: b'\x02\x00'
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: StripOffsets (273) - type: long (4) Tag Location: 82 - Data Location: 19532 - value: <table: 19296 bytes>
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: SamplesPerPixel (277) - type: short (3) - value: b'\x03\x00'
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: RowsPerStrip (278) - type: short (3) - value: b'\x02\x00'
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: StripByteCounts (279) - type: long (4) Tag Location: 118 - Data Location: 236 - value: <table: 19296 bytes>
2025-04-23 23:20:41,445 - PIL.TiffImagePlugin - DEBUG - tag: PlanarConfiguration (284) - type: short (3) - value: b'\x02\x00'
2025-04-23 23:20:41,446 - PIL.TiffImagePlugin - DEBUG - tag: SampleFormat (339) - type: short (3) Tag Location: 142 - Data Location: 38828 - value: b'\x01\x00\x01\x00\x01\x00'
2025-04-23 23:20:41,446 - PIL.TiffImagePlugin - DEBUG - tag: ModelPixelScaleTag (33550) - type: double (12) Tag Location: 154 - Data Location: 38992 - value: b'\x17\x07m[\x91\x9c\xc7>\x17\x07m[\x91\x9c\xc7>\x00\x00\x00\x00\x00\x00\x00\x00'
2025-04-23 23:20:41,446 - PIL.TiffImagePlugin - DEBUG - tag: ModelTiepointTag (33922) - type: double (12) Tag Location: 166 - Data Location: 39016 - value: <table: 48 bytes>
2025-04-23 23:20:41,446 - PIL.TiffImagePlugin - DEBUG - tag: GeoKeyDirectoryTag (34735) - type: short (3) Tag Location: 178 - Data Location: 39064 - value: <table: 64 bytes>
2025-04-23 23:20:41,446 - PIL.TiffImagePlugin - DEBUG - tag: GeoDoubleParamsTag (34736) - type: double (12) Tag Location: 190 - Data Location: 39128 - value: b'\x88mt\x96\x1d\xa4r@\x00\x00\x00@\xa6TXA'
2025-04-23 23:20:41,446 - PIL.TiffImagePlugin - DEBUG - tag: GeoAsciiParamsTag (34737) - type: string (2) Tag Location: 202 - Data Location: 39144 - value: b'WGS 84|\x00'
2025-04-23 23:20:41,447 - PIL.TiffImagePlugin - DEBUG - tag: GDAL_METADATA (42112) - type: string (2) Tag Location: 214 - Data Location: 38834 - value: <table: 158 bytes>
2025-04-23 23:20:41,447 - PIL.TiffImagePlugin - DEBUG - tag: GDAL_NODATA (42113) - type: string (2) - value: b'0\x00'
2025-04-23 23:20:41,447 - PIL.TiffImagePlugin - DEBUG - *** Summary ***
2025-04-23 23:20:41,447 - PIL.TiffImagePlugin - DEBUG - - compression: raw
2025-04-23 23:20:41,447 - PIL.TiffImagePlugin - DEBUG - - photometric_interpretation: 2
2025-04-23 23:20:41,447 - PIL.TiffImagePlugin - DEBUG - - planar_configuration: 2
2025-04-23 23:20:41,448 - PIL.TiffImagePlugin - DEBUG - - fill_order: 1
2025-04-23 23:20:41,448 - PIL.TiffImagePlugin - DEBUG - - YCbCr subsampling: None
2025-04-23 23:20:41,448 - PIL.TiffImagePlugin - DEBUG - - size: (3195, 3215)
2025-04-23 23:20:41,448 - PIL.TiffImagePlugin - DEBUG - format key: (b'II', 2, (1,), 1, (8, 8, 8), ())
2025-04-23 23:20:41,449 - PIL.TiffImagePlugin - DEBUG - - raw mode: RGB
2025-04-23 23:20:41,449 - PIL.TiffImagePlugin - DEBUG - - pil mode: RGB
INFO:     127.0.0.1:55809 - "POST /api/upload-image/ HTTP/1.1" 200 OK
INFO:     127.0.0.1:55812 - "GET /api/images/ HTTP/1.1" 200 OK
INFO:     127.0.0.1:55815 - "GET /uploads/b1edd5b5-0610-4128-9e78-db335ad035f3.tif HTTP/1.1" 200 OK
INFO:     127.0.0.1:55818 - "GET /api/images/091ce14d-0235-4b2d-98b2-dc8b3b6d153d/ HTTP/1.1" 200 OK
INFO:     127.0.0.1:55821 - "GET /api/images/091ce14d-0235-4b2d-98b2-dc8b3b6d153d/ HTTP/1.1" 200 OK
INFO:     127.0.0.1:55824 - "GET /uploads/b1edd5b5-0610-4128-9e78-db335ad035f3.tif HTTP/1.1" 206 Partial Content

Environment

  • Browser: Chrome/Firefox/Edge
  • OS: Windows
  • Application version: Development

Technical Information

The issue is likely due to limited browser support for rendering TIFF images in HTML Canvas elements. While the backend correctly uploads and stores TIFF files, the browser's native image handling may not be able to render them.

Possible Solutions

  1. Add server-side conversion of TIFF files to a browser-friendly format (like PNG or JPEG) for viewing
  2. Implement a client-side TIFF decoder library like tiff.js
  3. Create preview versions of TIFF images in a web-friendly format for the annotation interface

Additional Context

TIFF images of all sizes appear to be affected, not just large ones. This is likely a format compatibility issue rather than a size limitation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendServer-side development tasks.bugSomething isn't workingpriority-highFor high-priority issues.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions