Skip to content

PlanarConfiguration save #3622

@VariableDeclared

Description

@VariableDeclared

What did you do?

  • Open a file using Pillow Image.open im = Image.open(..blah)
  • downscale the image using Image.thumnail im.thumbnail(..blah)
    • (Args: (512, 512), Image.ANTIALIAS)
  • Save the image using save function, only passing new file name im.save('file_two.tif/tiff') - Same issue for tiff and tif.

What did you expect to happen?

Image would be saved, scaled down, and viewable.

What actually happened?

Image was downscaled, but corrupt, appears red and pixellated, cannot be opened in some image viewers.

Note: I cannot repeat this on Mac OS, haven't tried this on Debian... yet.

What are your OS, Python and Pillow versions?

  • OS: Windows 10 Version 10.0.17763 Build 17763
  • Python: Python 3.6.8
  • Pillow: Pillow 5.4.1

Corrupted Image

from PIL import Image
import os


mode = input("Enter mode")

files = [f for f in os.listdir('./{}'.format(mode)) if os.path.isfile(os.path.join('./{}'.format(mode), f))]

im = Image.open('./{}/{}'.format(mode, files[0]))
im.show()

input()
im.thumbnail((512, 512), Image.ANTIALIAS)

im.save('./PILissue.tiff')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions