minecart icon indicating copy to clipboard operation
minecart copied to clipboard

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

Open apdullahyayik opened this issue 4 years ago • 2 comments

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.

https://github.com/felipeochoa/minecart/blob/f39a3934e4be271f2cc061e44bee34c6d6cb4126/minecart/content.py#L368

apdullahyayik avatar Aug 11 '20 13:08 apdullahyayik

Also:

https://github.com/felipeochoa/minecart/blob/f39a3934e4be271f2cc061e44bee34c6d6cb4126/minecart/content.py#L280

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

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

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

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

apdullahyayik avatar Aug 11 '20 15:08 apdullahyayik

I never needed this. Feel free to submit a PR

felipeochoa avatar Aug 12 '20 20:08 felipeochoa