Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pillow cannot read from array gray image? #3781

Description

@zjplab

I have a pic:
391

Do some conversion:

AB = Image.open("./391.jpg").convert('RGB')
arr=np.array(AB)
gray=arr@np.array([0.2125, 0.7154, 0.0721]) # gray scale now 

Whatever mode you use, it just looks like fucked up:
image

But if you use scipy.misc.toimage
it is still usable:
image

I don't know how. Just very strange

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions