From b2aaf09e46d6c7450311c5f684f3d811521b3ad1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 26 Aug 2026 22:44:05 -0400 Subject: .ssp digest: add image file's own pixel dimensions Complete image file digest identity record: add px:x to the .ssp image record, read from the image file header (imageformats.read_image_info, no decode): .image: won_benkler_2_1.png sha256:5BA4...D128 bytes:93861 px:420x342 (The w##h## dimensions in the markup are display dimensions, not the file's: they are author set, or where given as w0h0 are derived by _image_dimensions and capped to a maximum display width, and they become the width/height attributes of the output format image display). (assisted by Claude-Code) --- src/sisudoc/ocda/meta/metadoc_object_setter.d | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sisudoc/ocda/meta/metadoc_object_setter.d') diff --git a/src/sisudoc/ocda/meta/metadoc_object_setter.d b/src/sisudoc/ocda/meta/metadoc_object_setter.d index 7abde64..a88f491 100644 --- a/src/sisudoc/ocda/meta/metadoc_object_setter.d +++ b/src/sisudoc/ocda/meta/metadoc_object_setter.d @@ -105,6 +105,9 @@ template ObjectSetter() { string fileName; ubyte[32] fileHash_sha256; ulong fileSize; + bool fileMissing = false; // file not found or unreadable, fileHash_sha256 & fileSize unset + int imageWidth = 0; // actual pixel dimensions of the + int imageHeight = 0; // file, not the display dimensions carried in the markup (w##h##) } struct SHA_256_Hashes_ { char[] summary; -- cgit v1.2.3