mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-20 17:06:42 +00:00
Add an experimental, opt-in PDF path importer on craft-pdf's interpret Device. Fills and strokes become ShapeLayers in document pixels with their real colours, widths and dash patterns; text, images, clipping paths, transparency groups, patterns, soft masks and annotations keep the raster page with a warning, so a page is never half imported. - ImportOptions::pdf_editable (off by default) and --pdf-editable. - pdf-editable Cargo feature in photocraft-io; the CLI enables it. - Shape caches are rendered within a 256 MiB page budget. - Cancellation is forwarded through a 5 ms watcher; hostile pages are caught and fall back instead of panicking. Tests cover fill/stroke colours and dashes, composite parity with the raster page, text fallback and cancellation.
65 lines
2.0 KiB
TOML
65 lines
2.0 KiB
TOML
[package]
|
|
name = "photocraft-cli"
|
|
description = "Headless PhotoCraft: convert, inspect, run commands, batch, MCP server"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
build = "build.rs"
|
|
|
|
[features]
|
|
default = ["gpu"]
|
|
# Open HEIC/HEIF photos (the optional photocraft-heif crate). Not default so distributors choose
|
|
# it; official builds (CI, packaging/, release) build with `--features heif`.
|
|
heif = ["photocraft-codecs/heif"]
|
|
# Optional native GPU rendering backend, enabled by default in native CLI builds.
|
|
gpu = ["photocraft-automation/gpu"]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
name = "photocraft_cli"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "photocraft-cli"
|
|
path = "src/main.rs"
|
|
|
|
[[example]]
|
|
name = "gpu_bench"
|
|
required-features = ["gpu"]
|
|
|
|
[dependencies]
|
|
photocraft-automation = { path = "../../crates/automation" }
|
|
photocraft-doc = { workspace = true }
|
|
photocraft-engine = { workspace = true }
|
|
photocraft-io = { workspace = true, features = ["pdf-editable"] }
|
|
photocraft-raster = { workspace = true }
|
|
photocraft-format = { path = "../../crates/format" }
|
|
photocraft-codecs = { workspace = true }
|
|
clap = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
|
|
|
|
[dev-dependencies]
|
|
serde = { workspace = true }
|
|
tempfile = "3"
|
|
# Reading back a saved PSD's merged-image flag (#8064).
|
|
photocraft-psd = { workspace = true }
|
|
# A real ICC profile for the --metadata test (#9466).
|
|
photocraft-cms = { workspace = true }
|
|
# Synthetic camera raws (#7789).
|
|
photocraft-raw = { workspace = true, features = ["testgen"] }
|
|
# Shell completions and man pages (examples/man-and-completions.rs, for the packages); not in
|
|
# the binary.
|
|
clap_complete = { workspace = true }
|
|
clap_mangen = { workspace = true }
|
|
# The PSD write recipe runner (tests/it/psd_write_oracle.rs).
|
|
xtask = { path = "../../xtask" }
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for photocraft-cli.exe; build.rs only uses it when targeting Windows.
|
|
winresource = "0.1"
|
|
|