Skip to content

Commit b553b74

Browse files
committed
Analyze at most the first two frames of the animated image
1 parent 00c2ade commit b553b74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/support/media-files/detect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function detectMediaType(
1717
try {
1818
const out = await spawnAsync('identify', [
1919
['-format', '%m %W %H %[orientation] %n|'],
20-
localFilePath,
20+
`${localFilePath}[0,1]`, // Select only up to 2 first frames to reduce the memory usage
2121
]);
2222

2323
// Select only the first values sequence (there could be more for animated images)

0 commit comments

Comments
 (0)