From 5da3017163a41651f249b770f5aae9c70c4edf9f Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Wed, 29 Jun 2016 18:11:42 +0900 Subject: [PATCH] (concord-images-add-url): Use feature `image-width' and feature `image-height' instead of feature `width' and feature `height'. (concord-images-add-segments): Likewise; use feature `image-offset-x' and feature `image-offset-y' instead of `offset-x' and `offset-y'. --- concord-images.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/concord-images.el b/concord-images.el index 3290595..84a6461 100644 --- a/concord-images.el +++ b/concord-images.el @@ -38,12 +38,12 @@ (goto-char (point-min)) (when (re-search-forward "^[ \t]*\"width\"[ \t]*:[ \t]*\\([0-9]+\\)" nil t) - (concord-object-put img-cobj 'width (string-to-int - (match-string 1)))) + (concord-object-put img-cobj 'image-width + (string-to-int (match-string 1)))) (when (re-search-forward "^[ \t]*\"height\"[ \t]*:[ \t]*\\([0-9]+\\)" nil t) - (concord-object-put img-cobj 'height (string-to-int - (match-string 1)))) + (concord-object-put img-cobj 'image-height + (string-to-int (match-string 1)))) )) (when iip (concord-object-put img-cobj '=location@iip iip)) @@ -77,17 +77,18 @@ (format "%s#xywh=%d,%d,%d,%d" (concord-object-get base-cobj '=location) x y width height)) - (concord-object-put seg-cobj 'offset-x x) - (concord-object-put seg-cobj 'offset-y y) - (concord-object-put seg-cobj 'width width) - (concord-object-put seg-cobj 'height height) + (concord-object-put seg-cobj 'image-offset-x x) + (concord-object-put seg-cobj 'image-offset-y y) + (concord-object-put seg-cobj 'image-width width) + (concord-object-put seg-cobj 'image-height height) (setq seg-iiif-url (format "%s/%d,%d,%d,%d/full/0/default.jpg" base-iiif-url x y width height)) (concord-object-put seg-cobj '=location@iiif seg-iiif-url) (when (setq base-iip-url (concord-object-get base-cobj '=location@iip)) - (setq base-width (concord-object-get base-cobj 'width) + (setq base-width (concord-object-get base-cobj 'image-width) base-width-f (float base-width) - base-height-f (float (concord-object-get base-cobj 'height))) + base-height-f (float + (concord-object-get base-cobj 'image-height))) (setq rel-x (/ x base-width-f) rel-y (/ y base-height-f) rel-w (/ width base-width-f) -- 1.7.10.4