mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 13:02:20 +00:00
Make image downscaling have a configurable factor (#1044)
Remove downscaling
This commit is contained in:
parent
29af355f20
commit
fb6ca73808
1 changed files with 0 additions and 7 deletions
|
@ -79,14 +79,7 @@ export async function extractPixelData(imageData: ImageBitmapSource): Promise<Im
|
|||
// Decode the image file binary data
|
||||
const image = await createImageBitmap(svgImageData || imageData);
|
||||
|
||||
// Halve the image size until the editor lag is somewhat usable
|
||||
// TODO: Fix lag so this can be removed
|
||||
const MAX_IMAGE_SIZE = 512;
|
||||
let { width, height } = image;
|
||||
while (width > MAX_IMAGE_SIZE || height > MAX_IMAGE_SIZE) {
|
||||
width /= 2;
|
||||
height /= 2;
|
||||
}
|
||||
width = Math.floor(width);
|
||||
height = Math.floor(height);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue