diff options
Diffstat (limited to 'org/metaverse.org')
-rw-r--r-- | org/metaverse.org | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/org/metaverse.org b/org/metaverse.org index f184d9e..644bc0a 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -2354,11 +2354,12 @@ auto _image_dimensions(O,M)(O obj, M manifested) { int w, h, chans; real _w, _h; int max_width = 640; - foreach (m; obj.text.matchAll(rgx.inline_image_without_dimensions)) { - debug(images) { - writeln(manifested.src.image_dir_path ~ "/" ~ m["img"]); + foreach (img; obj.text.matchAll(rgx.inline_image_without_dimensions)) { + try { + read_image_info(manifested.src.image_dir_path ~ "/" ~ img["img"], w, h, chans); // + } catch (Exception ex) { + writeln("WARNING, image not found: ", img["img"], "\n ", manifested.src.image_dir_path ~ "/" ~ img["img"]); } - read_image_info(manifested.src.image_dir_path ~ "/" ~ m["img"], w, h, chans); // calculate, decide max width and proportionally reduce to keep w & h within it debug(images) { writeln("width: ", w, ", height: ", h); |