PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
M11: say redaction removes Create PDF's Group 4 pictures whole for now
Grzegorz Martensa4058c92425d
diff --git a/Cargo.toml b/Cargo.tomlindex 5a92b6747..b2380a749 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -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"# foundationdiff --git a/crates/create/README.md b/crates/create/README.mdindex 8e0bdc68b..14d42e0a1 100644--- a/crates/create/README.md+++ b/crates/create/README.md@@ -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 withthe 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 thediff --git a/parity/acrobat-features.toml b/parity/acrobat-features.tomlindex 81c971dbc..731089369 100644--- a/parity/acrobat-features.toml+++ b/parity/acrobat-features.toml@@ -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"