cvm-rs: allow setting JPEG quality from JS
This commit is contained in:
@@ -20,7 +20,8 @@ export class JPEGEncoder {
|
||||
width: rect.width,
|
||||
height: rect.height,
|
||||
stride: displaySize.width,
|
||||
buffer: canvas.subarray(offset)
|
||||
buffer: canvas.subarray(offset),
|
||||
quality: gJpegQuality
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +31,8 @@ export class JPEGEncoder {
|
||||
height: size.height,
|
||||
desiredWidth: kThumbnailSize.width,
|
||||
desiredHeight: kThumbnailSize.height,
|
||||
buffer: buffer
|
||||
buffer: buffer,
|
||||
quality: Math.floor(gJpegQuality / 1.5)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user