Skip to content

Commit fcc03f4

Browse files
fix(utils): report ImageMagick file sizes in bytes (#6)
Co-authored-by: rissrice2105-agent <289161642+rissrice2105-agent@users.noreply.github.com>
1 parent ff6e317 commit fcc03f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export async function getImageMetadata(inputPath) {
218218
// Use ImageMagick identify to get image metadata
219219
const args = [
220220
'-format',
221-
'%w %h %m %Q %[colorspace] %b',
221+
'%w %h %m %Q %[colorspace] %B',
222222
inputPath
223223
];
224224

@@ -252,7 +252,7 @@ export async function getImageMetadata(inputPath) {
252252
result.format = {
253253
filename: inputPath,
254254
formatName: format,
255-
size: parseInt(filesize) || 0
255+
size: parseInt(filesize, 10) || 0
256256
};
257257

258258
// Image metadata

0 commit comments

Comments
 (0)