Fix image resize function
This commit is contained in:
@@ -6,7 +6,7 @@ export function getImageSize(width: number, height: number, targetMegapixels: nu
|
|||||||
const originalPixels = width * height;
|
const originalPixels = width * height;
|
||||||
const targetPixels = targetMegapixels * 1000 * 1000;
|
const targetPixels = targetMegapixels * 1000 * 1000;
|
||||||
|
|
||||||
if (originalPixels >= targetPixels) {
|
if (originalPixels <= targetPixels) {
|
||||||
return {
|
return {
|
||||||
width,
|
width,
|
||||||
height
|
height
|
||||||
|
|||||||
Reference in New Issue
Block a user