aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/ocda/abstraction/ssp.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/ocda/abstraction/ssp.d')
-rw-r--r--src/sisudoc/ocda/abstraction/ssp.d18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/sisudoc/ocda/abstraction/ssp.d b/src/sisudoc/ocda/abstraction/ssp.d
index ea76d71..25cc467 100644
--- a/src/sisudoc/ocda/abstraction/ssp.d
+++ b/src/sisudoc/ocda/abstraction/ssp.d
@@ -286,10 +286,13 @@ template spineAbstractionTxt() {
}
}
/+ ↓ images, repeatable record, one per image in order of appearance:
- .image: <filename> sha256:<HEX> bytes:<n>
- filename first (the object's handle on the image), remaining fields
- self-describing key:value tokens so that further fields (e.g. dim:)
- can be added later without invalidating existing readers
+ .image: <filename> sha256:<HEX> bytes:<n> px:<width>x<height>
+ .image: <filename> missing:true
+ filename first (the object's handle on the image), remaining fields
+ self-describing key:value tokens so that further fields can be
+ added later without invalidating existing readers. px: is the
+ file's own pixel size, not the display dimensions (w##h##) which
+ the object text already carries
+/
if (obj.metainfo.sha256.images.length > 0) {
foreach (i; obj.metainfo.sha256.images) {
@@ -298,7 +301,12 @@ template spineAbstractionTxt() {
~ " missing:true"
: ".image: " ~ i.fileName
~ " sha256:" ~ i.fileHash_sha256.toHexString.to!string
- ~ " bytes:" ~ i.fileSize.to!string;
+ ~ " sha256:" ~ i.fileHash_sha256.toHexString.to!string
+ ~ " bytes:" ~ i.fileSize.to!string
+ ~ ((i.imageWidth > 0 && i.imageHeight > 0)
+ ? " px:" ~ i.imageWidth.to!string
+ ~ "x" ~ i.imageHeight.to!string
+ : "");
}
}
/+ ↓ text attributes +/