Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why "mode", sample "rawmode", "samples" are not used when creating PIL object #37

Open
apdullahyayik opened this issue Aug 11, 2020 · 2 comments

Comments

@apdullahyayik
Copy link

As it is seen, at as_pil method of Image Class considers filter, colorspace and bits that are attributes of LTImage object at pdfminer package. But, why these are not used when creating PIL object ? I think these are invalueable params to use frombytes method of PIL.

image = PIL.Image.open(io.BytesIO(image_data))

@apdullahyayik apdullahyayik changed the title Why "mode", sample "rawmode", "samples" is not used when creating PIL object Why "mode", sample "rawmode", "samples" are not used when creating PIL object Aug 11, 2020
@apdullahyayik
Copy link
Author

Also:

if colorspace in ('DeviceRGB', 'CalRGB', 'RGB'):

colorspaces should be integrated to pdfminer' s.
I have corrected below:

'RGB': ("'DeviceRGB'", "'CalRGB'", "'RGB'"),

'GRAY': ("'CalGray", "'DeviceGray'"),

'CMYK': ("'DeviceCMYK'", "'CMYK'")

@felipeochoa
Copy link
Owner

I never needed this. Feel free to submit a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants