Skip to content

Commit 04bcd41

Browse files
authored
Merge pull request #9 from sdrinf/patch-1
Automatic image resizing for captured camera/screen
2 parents 3d57a9a + 7f7cf86 commit 04bcd41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/src/hooks/utils/use-media-capture.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function useMediaCapture() {
8484
return null;
8585
}
8686

87-
ctx.drawImage(bitmap, 0, 0);
87+
ctx.drawImage(bitmap, 0, 0, width, height);
8888
const quality = getCompressionQuality();
8989
return canvas.toDataURL('image/jpeg', quality);
9090
} catch (error) {

0 commit comments

Comments
 (0)