简体   繁体   中英

Coverting Tiff to JPEG with Gdal_tranlate

I'm converting a 16-bit tiff image to JPEG with the gdal_translate library. But it drops from 16 bits to 8 bits. Is here any way that I can keep the bit depth at 16. Or should I need to get tiff image with higher bit depth.

Options

scale = "0-65535"
    options_list = [
        '-ot Byte',
        '-of JPEG', 
        '-b 1',
        '-co QUALITY=100',
        scale
    ]

You have used -ot Byte which is 8 bits by definition. I don't think UInt16 JPEG is supported. It should work with PNG.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM