我复制了以下代码: https://github.com/kyamagu/bbox-annotator/blob/master/mturk.html#L401
目前,我正在尝试调整从input.csv文件加载的图像。我不知道如何调整它,我试图找到
<img src=" ... ">
给课程。有什么想法吗?
答案 0 :(得分:0)
在本节中使用javascript创建图像:
image_element = new Image();
image_element.src = options.url;
image_element.onload = function() {
options.width || (options.width = image_element.width);
options.height || (options.height = image_element.height);
annotator.annotator_element.css({
"width": (options.width + annotator.border_width * 2) + 'px',
"height": (options.height + annotator.border_width * 2) + 'px',
"cursor": "crosshair"
});
annotator.image_frame.css({
"background-image": "url('" + image_element.src + "')",
"width": options.width + "px",
"height": options.height + "px",
"position": "relative"
});
所以image_element
是您需要操纵的对象,可能跟随this method