Fix a typo in tileset detection

This commit is contained in:
Eevee (Evelyn Woods) 2021-06-06 03:06:59 -06:00 committed by Eevee (Evelyn Woods)
parent 47313521ed
commit 34e430e8a1

View File

@ -3141,7 +3141,7 @@ export function infer_tileset_from_image(img, make_canvas) {
// XXX this assumes square tiles, but i have written mountains of code that doesn't! // XXX this assumes square tiles, but i have written mountains of code that doesn't!
if (w / h === aspect_ratio) { if (w / h === aspect_ratio) {
let image_data = ctx.getImageData(0, 0, canvas.width, canvas.height); let image_data = ctx.getImageData(0, 0, canvas.width, canvas.height);
let did_anything = erase_tileset_background(image_data.data, layout); let did_anything = erase_tileset_background(image_data, layout);
let tw = Math.floor(canvas.width / w); let tw = Math.floor(canvas.width / w);
let th = Math.floor(canvas.height / h); let th = Math.floor(canvas.height / h);
if (layout['#ident'] === 'tw-static') { if (layout['#ident'] === 'tw-static') {