Schema: Bildoperationen (removeBackground/dropShadow/flatten) und Asset-Bildmodus
- image-filter.schema.json: removeBackground (color/tolerance/fromEdges/edgeBlur/ referenceWidth), dropShadow (color/opacity/blur/offsets/padding/referenceWidth/ canvas/background), flatten; Tippfehler mitchellNetravili -> mitchellNetravali - asset.schema.json: optionaler imageProcessing-Block (access/cachePath/ allowOriginal/defaultFilter/allowedInputTypes/limits/imageFilter) - index.d.ts: passende Interfaces inkl. AssetConfig - Beispiel: examples/server/asset-image-processing.yml, demo-api imageFilter.shadow - validate-schemas.mjs: examples/server-Pattern je Schema
This commit is contained in:
1 parent
f26f8c7802
commit
913d5f4cb6
6 files changed
+263
-4
No files matched your search
@@ -0,0 +1,36 @@
|
||||
# Beispiel für einen Asset-Eintrag mit Bildverarbeitung (imageProcessing)
|
||||
# (tibi-server, ProjectConfig.assets[]) — validiert gegen schemas/config/asset.schema.json.
|
||||
# Hinweis: cachePath muss ein existierendes Verzeichnis ausserhalb des Quellpfads
|
||||
# sein; die Ajv-Validierung prueft nur Form und Wertebereiche, keine Dateisystempfade.
|
||||
name: product-images
|
||||
path: ./media/products
|
||||
imageProcessing:
|
||||
access: public
|
||||
cachePath: ./media-cache/products
|
||||
allowOriginal: false
|
||||
defaultFilter: shadow
|
||||
allowedInputTypes: ["image/jpeg", "image/png", "image/webp"]
|
||||
limits:
|
||||
maxInputBytes: 26214400
|
||||
maxPixels: 20000000
|
||||
imageFilter:
|
||||
shadow:
|
||||
- width: 800
|
||||
outputType: png
|
||||
removeBackground:
|
||||
color: "#FFFFFF"
|
||||
tolerance: 8
|
||||
fromEdges: true
|
||||
edgeBlur: 1.5
|
||||
referenceWidth: 1000
|
||||
dropShadow:
|
||||
color: "#000000"
|
||||
opacity: 0.25
|
||||
blur: 15
|
||||
offsetX: 8
|
||||
offsetY: 8
|
||||
padding: 20
|
||||
referenceWidth: 1000
|
||||
canvas: expand
|
||||
background: transparent
|
||||
flatten: "#FFFFFF"
|
||||
Reference in new issue
Block a user