diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-04 11:43:53 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-04 11:43:53 -0400 |
| commit | a489b74853a57c2f4bd12bbdf43f9f293e5f210a (patch) | |
| tree | 9cd67b3f8193e08001f7632860cadd92599a3f06 /dlang/src/read/verify.d | |
| parent | track (diff) | |
track orgifyorgify
Diffstat (limited to 'dlang/src/read/verify.d')
| -rw-r--r-- | dlang/src/read/verify.d | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dlang/src/read/verify.d b/dlang/src/read/verify.d index 0322242..21d4a87 100644 --- a/dlang/src/read/verify.d +++ b/dlang/src/read/verify.d @@ -205,7 +205,8 @@ private FileStat_ readFileStat(string pth) { /+ ↓ pixel dimensions from the file header, for the formats spine's markup admits (png, gif, jpg). Header read only, no decoding, and no dependency - beyond phobos. Returns [0, 0] where the header cannot be read +/ + beyond phobos. Returns [0, 0] where the header cannot be read ++/ private int[2] readImageDimensions(string pth) { int[2] ret = [0, 0]; ubyte[] head; @@ -231,7 +232,8 @@ private int[2] readImageDimensions(string pth) { } if (head.length >= 4 && head[0] == 0xff && head[1] == 0xd8) { /+ jpeg: walk the segments to a start of frame, height then width, - big endian, at offsets 5 and 7 of the segment +/ + big endian, at offsets 5 and 7 of the segment + +/ size_t i = 2; while (i + 9 < head.length) { if (head[i] != 0xff) { i += 1; continue; } |
