optimize: remove inaccurate about ICCs

pikepdf will now get the ICC profile out and put it in the JPEG.
This commit is contained in:
James R. Barlow
2022-02-07 19:42:13 -08:00
parent 863d560632
commit 6c78a46285
-8
View File
@@ -172,14 +172,6 @@ def extract_image_generic(
# jpeg_quality_estimate = 117.0 * (bytes_per_pixel ** 0.213)
# if jpeg_quality_estimate < 65:
# return None
# We could get the ICC profile here, but there's no need to look at it
# for quality transcoding
# if icc:
# stream = BytesIO(raw_jpeg.read_raw_bytes())
# iccbytes = icc.read_bytes()
# with Image.open(stream) as im:
# im.save(jpg_name(root, xref), icc_profile=iccbytes)
try:
imgname = root / f'{xref:08d}'
with imgname.open('wb') as f: