[Python] Read 16 bit color depth image with Wand

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    I want to process a 24-bit image in 16-bit mode with Wand. This is how I read the image

    from wand.image import Image as WandImage

    source_file='img/in.tif'

    with WandImage(filename=source_file, depth=16) as img:
    print(img.depth)
    print(max(img.export_pixels()))


    the output is 8 and 255, so the color depth is still 8 bit. The depth=16 argument did not change anything. What is going wrong? My wand version is

    Wand 0.6.13
    ImageMagick 7.1.1-38 Q16-HDRI x64 b0ab922:20240901 https://imagemagick.org

    Continue reading...

Compartilhe esta Página