1
0
Fork 0
forked from josch/img2pdf

clarify that input with an alpha channel requires additional computation (closes: #142)

This commit is contained in:
Johannes Schauer Marin Rodrigues 2022-04-07 17:13:16 +02:00
parent e8ca53738f
commit 3b117e674b
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1
2 changed files with 11 additions and 11 deletions

View file

@ -28,10 +28,10 @@ The following table shows how img2pdf handles different input depending on the
input file format and image color space. input file format and image color space.
| Format | Colorspace | Result | | Format | Colorspace | Result |
| -------------------- | ------------------------------ | ------------- | | ------------------------------------- | ------------------------------ | ------------- |
| JPEG | any | direct | | JPEG | any | direct |
| JPEG2000 | any | direct | | JPEG2000 | any | direct |
| PNG (non-interlaced) | any | direct | | PNG (non-interlaced, no transparency) | any | direct |
| TIFF (CCITT Group 4) | monochrome | direct | | TIFF (CCITT Group 4) | monochrome | direct |
| any | any except CMYK and monochrome | PNG Paeth | | any | any except CMYK and monochrome | PNG Paeth |
| any | monochrome | CCITT Group 4 | | any | monochrome | CCITT Group 4 |

View file

@ -1823,8 +1823,8 @@ def read_images(rawdata, colorspace, first_frame_only=False, rot=None):
smaskidat, _, _ = to_png_data(a) smaskidat, _, _ = to_png_data(a)
logger.warning( logger.warning(
"Image contains an alpha channel which will be stored " "Image contains an alpha channel. Computing a separate "
"as a separate soft mask (/SMask) image in PDF." "soft mask (/SMask) image to store transparency in PDF."
) )
elif color in [Colorspace.P, Colorspace.PA] and iccp is not None: elif color in [Colorspace.P, Colorspace.PA] and iccp is not None:
# PDF does not support palette images with icc profile # PDF does not support palette images with icc profile