mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 05:58:12 -06:00
A scan saved as a 1-bit PNG decodes to eight-bit grey and was stored that way, larger than the PNG it came from; a bilevel TIFF was stored at one bit but with Flate. Now any image of only pure black and white (1-bit, 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. A grey profile stays; RGB with a profile keeps its colours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BfMGHQNgdq5yf5tKZHGR3z
31 lines
1.0 KiB
TOML
31 lines
1.0 KiB
TOML
[package]
|
|
name = "pdfcraft-create"
|
|
description = "Create PDFs: blank documents, from images (PNG, JPEG) and from plain text"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
pdfcraft-cos = { workspace = true }
|
|
pdfcraft-filters = { workspace = true }
|
|
pdfcraft-model = { workspace = true }
|
|
pdfcraft-fonts = { workspace = true }
|
|
# For `image::bmp_with_pixel_offset`, shared with XFA pictures.
|
|
pdfcraft-xfa = { workspace = true }
|
|
png = "0.18"
|
|
tiff = "0.11"
|
|
image = { version = "0.25", default-features = false, features = ["bmp", "gif", "jpeg"] }
|
|
# Already in the graph through image; read directly for CMYK JPEG samples, which image converts to RGB.
|
|
zune-jpeg = "0.5"
|
|
thiserror = { workspace = true }
|
|
# Already in the graph through lopdf; used only to read plain-text files (decode_text).
|
|
encoding_rs = "0.8"
|
|
|
|
[dev-dependencies]
|
|
hayro-ccitt.workspace = true
|
|
image = { version = "0.25", default-features = false, features = ["bmp", "gif", "jpeg"] }
|
|
hayro-syntax = { workspace = true }
|