为什么 Crowd HTML 打破了这张图片?

Why is Crowd HTML breaking this image?

我正在使用 Crowd HTML Elements 来执行边界框注释,但是当我尝试加载我的一些图像时,我在开发工具控制台中收到此错误:

crowd-html-elements.js:1 window.onError received an event without an error:  {event: ErrorEvent}
(anonymous) @ crowd-html-elements.js:1
error (async)
e @ crowd-html-elements.js:1
e @ crowd-html-elements.js:1
./src/crowd-html-elements-loader.ts @ crowd-html-elements.js:1
s @ crowd-html-elements.js:1
(anonymous) @ crowd-html-elements.js:1
(anonymous) @ crowd-html-elements.js:1
crowd-html-elements-without-ce-polyfill.js:6282 window.onError received an event without an error:  {event: ErrorEvent}
(anonymous) @ crowd-html-elements-without-ce-polyfill.js:6282
error (async)
e @ crowd-html-elements-without-ce-polyfill.js:6282
e @ crowd-html-elements-without-ce-polyfill.js:6282
./src/index.ts @ crowd-html-elements-without-ce-polyfill.js:6282
r @ crowd-html-elements-without-ce-polyfill.js:1
(anonymous) @ crowd-html-elements-without-ce-polyfill.js:1
(anonymous) @ crowd-html-elements-without-ce-polyfill.js:1
crowd-html-elements-without-ce-polyfill.js:6282 Uncaught Error: Unexpected image dimensions during normalization
    at Function.normalizeHeight (crowd-html-elements-without-ce-polyfill.js:6282)
    at Function.normalizeDimensions (crowd-html-elements-without-ce-polyfill.js:6282)
    at new a (crowd-html-elements-without-ce-polyfill.js:6282)
    at ie.handleTargetImageLoaded (crowd-html-elements-without-ce-polyfill.js:6282)
    at Image.r.onload (crowd-html-elements-without-ce-polyfill.js:6282)
normalizeHeight @ crowd-html-elements-without-ce-polyfill.js:6282
normalizeDimensions @ crowd-html-elements-without-ce-polyfill.js:6282
a @ crowd-html-elements-without-ce-polyfill.js:6282
handleTargetImageLoaded @ crowd-html-elements-without-ce-polyfill.js:6282
r.onload @ crowd-html-elements-without-ce-polyfill.js:6282
load (async)
setBackgroundImage @ crowd-html-elements-without-ce-polyfill.js:6282
renderImageSrcChange @ crowd-html-elements-without-ce-polyfill.js:6282
shouldComponentUpdate @ crowd-html-elements-without-ce-polyfill.js:6282
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
F @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
E @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
E @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
E @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
T @ crowd-html-elements-without-ce-polyfill.js:6278
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
F @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
T @ crowd-html-elements-without-ce-polyfill.js:6278
G @ crowd-html-elements-without-ce-polyfill.js:6278
w @ crowd-html-elements-without-ce-polyfill.js:6278
S @ crowd-html-elements-without-ce-polyfill.js:6278
e.reactMount @ crowd-html-elements-without-ce-polyfill.js:3
e.updateRegion @ crowd-html-elements-without-ce-polyfill.js:3
(anonymous) @ crowd-html-elements-without-ce-polyfill.js:3
(anonymous) @ crowd-html-elements-without-ce-polyfill.js:3
(anonymous) @ crowd-html-elements-without-ce-polyfill.js:3
e.reactBatchUpdate @ crowd-html-elements-without-ce-polyfill.js:3
i @ crowd-html-elements-without-ce-polyfill.js:3
f.componentDidUpdate @ crowd-html-elements-without-ce-polyfill.js:3
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
F @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
E @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
E @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
T @ crowd-html-elements-without-ce-polyfill.js:6278
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
q @ crowd-html-elements-without-ce-polyfill.js:6278
B @ crowd-html-elements-without-ce-polyfill.js:6278
F @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
E @ crowd-html-elements-without-ce-polyfill.js:6278
N @ crowd-html-elements-without-ce-polyfill.js:6278
T @ crowd-html-elements-without-ce-polyfill.js:6278
G @ crowd-html-elements-without-ce-polyfill.js:6278
w @ crowd-html-elements-without-ce-polyfill.js:6278
_renderReactComponent @ crowd-html-elements-without-ce-polyfill.js:6282
_updateReactComponent @ crowd-html-elements-without-ce-polyfill.js:6282
Y @ crowd-html-elements-without-ce-polyfill.js:5984
C @ crowd-html-elements-without-ce-polyfill.js:5984
k @ crowd-html-elements-without-ce-polyfill.js:5984
_propertiesChanged @ crowd-html-elements-without-ce-polyfill.js:5984
_flushProperties @ crowd-html-elements-without-ce-polyfill.js:5954
_flushProperties @ crowd-html-elements-without-ce-polyfill.js:5984
_invalidateProperties @ crowd-html-elements-without-ce-polyfill.js:5984
_setProperty @ crowd-html-elements-without-ce-polyfill.js:5984
Object.defineProperty.set @ crowd-html-elements-without-ce-polyfill.js:5954
(anonymous) @ labeling.html:199
async function (async)
(anonymous) @ labeling.html:198
Promise.then (async)
(anonymous) @ labeling.html:196

规范化期间意外的图像尺寸 部分似乎是问题所在,但我没有发现任何有关故障排除的信息。有人可以解释一下预期的图像尺寸是多少以及为什么有些尺寸会失败吗?

这是引发错误的代码片段。

            static normalizeHeight(e) {
                if (e.height === e.naturalHeight)
                    return e.height;
                if (e.height === e.naturalWidth)
                    return e.height;
                if (Math.abs(e.height - e.naturalHeight) < 2)
                    return e.naturalHeight;
                if (Math.abs(e.height - e.naturalWidth) < 2)
                    return e.naturalWidth;
                throw new Error("Unexpected image dimensions during normalization")
            }
            static normalizeWidth(e) {
                if (e.width === e.naturalWidth)
                    return e.width;
                if (e.width === e.naturalHeight)
                    return e.width;
                if (Math.abs(e.width - e.naturalWidth) < 2)
                    return e.naturalWidth;
                if (Math.abs(e.width - e.naturalHeight) < 2)
                    return e.naturalHeight;
                throw new Error("Unexpected image dimensions during normalization")

谢谢!

事实证明,该问题与应用于加载标签工具的我网站的 canvas 部分的 css 样式有关。