Converting PNG from mode I to mode RGB results in completely white image

Create issue
Issue #37 new
Salvatore Iovene created an issue

The attached image, a PNG with mode "I" cannot be converted to JPEG.

If I leave the mode alone, PIL will complain that it "cannot write mode I as JPEG."

If I convert it to RGB, I get a fully white image as a result.

Workarounds would be appreciated, thank you!

Comments (1)

  1. Salvatore Iovene reporter

    Note: converting to 8-bit first seems to work:

    im ="NGC281.png")
    table = [i/256 for i in range(65536)]
    im = im.point(table, 'L')"resized.png")

    However, I'm losing bit depth.

  2. Log in to comment