Skip to content

Commit 7f7cf86

Browse files
authored
Update use-media-capture.tsx
Added automatic image resizing on camera/screen capture
1 parent 3d57a9a commit 7f7cf86

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)