Compare commits

..

No commits in common. "ba7a360866f622994be5eabc8eee445b5da7576e" and "5cd0918d502e8559fa4f74288edaf612d71e4fa3" have entirely different histories.

3 changed files with 17 additions and 28 deletions

View file

@ -2,16 +2,6 @@
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.5.0" VERSION = "0.4.4"
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.5.0" __version__ = "0.4.4"
default_dpi = 96.0 default_dpi = 96.0
papersizes = { papersizes = {
"letter": "8.5inx11in", "letter": "8.5inx11in",
@ -1489,8 +1489,10 @@ 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("Ignoring non-GRAY ICC profile in Grayscale JPG") logger.warning(
"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)
@ -4092,20 +4094,17 @@ RGB.""",
% Image.MAX_IMAGE_PIXELS, % Image.MAX_IMAGE_PIXELS,
) )
if sys.platform == "win32": outargs.add_argument(
pass "--pdfa",
else: nargs="?",
outargs.add_argument( const=get_default_icc_profile(),
"--pdfa", default=None,
nargs="?", help="Output a PDF/A-1b compliant document. By default, this will "
const=get_default_icc_profile(), "embed either /usr/share/color/icc/sRGB.icc, "
default=None, "/usr/share/color/icc/OpenICC/sRGB.icc or "
help="Output a PDF/A-1b compliant document. By default, this will " "/usr/share/color/icc/colord/sRGB.icc as the color profile, whichever "
"embed either /usr/share/color/icc/sRGB.icc, " "is found to exist first.",
"/usr/share/color/icc/OpenICC/sRGB.icc or " )
"/usr/share/color/icc/colord/sRGB.icc as the color profile, whichever "
"is found to exist first.",
)
sizeargs = parser.add_argument_group( sizeargs = parser.add_argument_group(
title="Image and page size and layout arguments", title="Image and page size and layout arguments",