Compare commits

...

2 commits

3 changed files with 28 additions and 17 deletions

View file

@ -2,6 +2,16 @@
CHANGES CHANGES
======= =======
0.5.0 (2023-10-28)
------------------
- support MIFF for 16 bit CMYK input
- accept pathlib.Path objects as input
- don't store RGB ICC profiles from bilevel or grayscale TIFF, PNG and JPEG
- thumbnails are no longer included by default and --include-thumbnails has to
be used if you want them
- support for pikepdf (>= 6.2.0)
0.4.4 (2022-04-07) 0.4.4 (2022-04-07)
------------------ ------------------

View file

@ -1,7 +1,7 @@
import sys import sys
from setuptools import setup from setuptools import setup
VERSION = "0.4.4" VERSION = "0.5.0"
INSTALL_REQUIRES = ( INSTALL_REQUIRES = (
"Pillow", "Pillow",

View file

@ -62,7 +62,7 @@ try:
except ImportError: except ImportError:
have_pikepdf = False have_pikepdf = False
__version__ = "0.4.4" __version__ = "0.5.0"
default_dpi = 96.0 default_dpi = 96.0
papersizes = { papersizes = {
"letter": "8.5inx11in", "letter": "8.5inx11in",
@ -1489,10 +1489,8 @@ def get_imgmetadata(
with io.BytesIO(iccp) as f: with io.BytesIO(iccp) as f:
prf = ImageCms.ImageCmsProfile(f) prf = ImageCms.ImageCmsProfile(f)
if prf.profile.xcolor_space not in ('GRAY'): if prf.profile.xcolor_space not in ("GRAY"):
logger.warning( logger.warning("Ignoring non-GRAY ICC profile in Grayscale JPG")
"Ignoring non-GRAY ICC profile in Grayscale JPG"
)
iccp = None iccp = None
logger.debug("width x height = %dpx x %dpx", imgwidthpx, imgheightpx) logger.debug("width x height = %dpx x %dpx", imgwidthpx, imgheightpx)
@ -4094,6 +4092,9 @@ RGB.""",
% Image.MAX_IMAGE_PIXELS, % Image.MAX_IMAGE_PIXELS,
) )
if sys.platform == "win32":
pass
else:
outargs.add_argument( outargs.add_argument(
"--pdfa", "--pdfa",
nargs="?", nargs="?",