Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Commit 99c767f

Browse files
committed
fix: do not convert ref image file to base64 to get size
1 parent 36002b8 commit 99c767f

File tree

4 files changed

+88
-83
lines changed

4 files changed

+88
-83
lines changed

lib/state-processor/capture-processor/capture-processor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ module.exports = class CaptureProcessor {
3636
return utils.existsRef(refImg.path)
3737
.then((isRefExists) => {
3838
if (isRefExists) {
39-
const refImgBase64 = fs.readFileSync(refImg.path);
40-
refImg.size = Image.fromBase64(refImgBase64).getSize();
39+
const refImgBuff = fs.readFileSync(refImg.path);
40+
refImg.size = Image.create(refImgBuff).getSize();
4141
}
4242

4343
return isRefExists

0 commit comments

Comments
 (0)