IS-AgroSmart / AgroSmart-Web

1 stars 1 forks source link

ODM doesn't create PNG preview anymore? #9

Closed jreyesr closed 4 years ago

jreyesr commented 4 years ago

Last version of ODM appears to not create the PNG orthomosaic, which breaks the code for preview creation. Needs confirmation! If confirmed, need to edit _try_create_thumbnail.

jreyesr commented 4 years ago

RGB flights seem to work again just by changing the .png extension on _try_create_thumbnail to .tif. Still need to check what happens with a multispectral TIFF as input.

jreyesr commented 4 years ago

Confirmed RGB works again by changing the extension. Multispectral needs more work, per this issue, since Pillow doesn't support 16 bits per channel on multichannel images: extract the first 3 bands + alpha, reduce to 8 bits per channel, merge again, save to 3-band TIFF + 1-band TIFF mask, load into Pillow and convert to thumbnail. The 3-band TIFF can also be used on Geoserver, but it loses transparency. Black pixels (#000000) must be used as the transparent value when creating the layer.