mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 05:58:12 -06:00
M11: say redaction removes Create PDF's Group 4 pictures whole for now
Redaction doesn't decode CCITT yet, so a mark over part of a picture Create PDF stored as Group 4 removes the whole picture (nothing leaks); before this PR such pictures were eight-bit Flate and had only the covered pixels cleared. The create README and the image-to-PDF parity note say so; #4384 adds CCITT to redaction. The workspace's comment on hayro-ccitt says Export uses it, not only tests. From reviews with the pdfcraft-review skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P6yUtvWGPsJpMLyh6pxSXG
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
096f6431c7
commit
a4058c9242
+2
-1
@@ -67,7 +67,8 @@ flate2 = { version = "1.1", default-features = false, features = ["rust_backend"
|
||||
weezl = "0.2"
|
||||
# CCITT Group 4 encoding (pdfcraft-filters); already in the tree through tiff.
|
||||
fax = "0.2.7"
|
||||
# An independent CCITT decoder, for round-trip tests; already in the tree through hayro.
|
||||
# A CCITT decoder: Export ▸ Images decodes fax images with it, and the encoder's round-trip tests
|
||||
# check against it; already in the tree through hayro.
|
||||
hayro-ccitt = "0.3"
|
||||
|
||||
# foundation
|
||||
|
||||
@@ -8,7 +8,9 @@ Layer L4. Create a PDF (Acrobat's Create a PDF tool), execution plan M10.2:
|
||||
(`/DCTDecode`, grey, RGB or Adobe-inverted CMYK); PNG is decoded and stored with Flate,
|
||||
with transparency as a soft mask. A picture of only pure black and white (a 1-bit PNG or TIFF,
|
||||
eight-bit grey, a two-colour palette, RGB without a profile) is stored at one bit per pixel, as
|
||||
CCITT Group 4 or Flate, whichever is smaller as stored (`pdfcraft_filters::encode_g4`). An ICC profile in the file (JPEG `APP2 ICC_PROFILE`, PNG
|
||||
CCITT Group 4 or Flate, whichever is smaller as stored (`pdfcraft_filters::encode_g4`).
|
||||
Redaction doesn't decode Group 4 yet: a mark over part of such a picture removes the whole
|
||||
picture (nothing leaks). An ICC profile in the file (JPEG `APP2 ICC_PROFILE`, PNG
|
||||
`iCCP`) that matches the image's colour space is kept as an `/ICCBased` colour space with
|
||||
the device space as `/Alternate`; images with the same profile share one profile object.
|
||||
JPEG metadata scanning skips marker fill bytes and reads application segments after the
|
||||
|
||||
@@ -6885,7 +6885,7 @@ status = "shipped"
|
||||
commands = ["create.images"]
|
||||
tools = ["doc_create"]
|
||||
evidence = ["crates/create/src/tests.rs::black_and_white_images_are_stored_at_one_bit", "crates/create/src/tests.rs::jpeg_2000_images_are_embedded_as_is", "crates/create/src/tests.rs::images_export_as_jpeg_unchanged_and_others_as_png", "crates/create/src/tests.rs::embedded_icc_profiles_tag_the_image_colour_space"]
|
||||
notes = "PNG, JPEG, TIFF (multi-page), GIF (first frame), BMP, and JPEG 2000 (JP2 or codestream, embedded as JPXDecode with its capture resolution). JPEG and PNG ICC profiles are kept as /ICCBased; TIFF profiles are not read yet. A picture of only pure black and white (a 1-bit PNG or TIFF, eight-bit grey, a two-colour palette, RGB without a profile) is stored at one bit per pixel, as CCITT Group 4 or Flate, whichever is smaller"
|
||||
notes = "PNG, JPEG, TIFF (multi-page), GIF (first frame), BMP, and JPEG 2000 (JP2 or codestream, embedded as JPXDecode with its capture resolution). JPEG and PNG ICC profiles are kept as /ICCBased; TIFF profiles are not read yet. A picture of only pure black and white (a 1-bit PNG or TIFF, eight-bit grey, a two-colour palette, RGB without a profile) is stored at one bit per pixel, as CCITT Group 4 or Flate, whichever is smaller. Redaction doesn't decode Group 4 yet: a mark over part of such a picture removes it whole (nothing leaks)"
|
||||
|
||||
[[feature]]
|
||||
id = "create.from-multipage-tiff"
|
||||
|
||||
Reference in New Issue
Block a user