Skip to content

Commit

Permalink
address edge case of empty mask
Browse files Browse the repository at this point in the history
  • Loading branch information
sashankaryal committed Nov 25, 2024
1 parent 80039dd commit 781a4f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/packages/looker/src/worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ const collectBitmapPromises = (label, cls, bitmapPromises) => {
if (label[overlayField]) {
const [height, width] = label[overlayField].data.shape;

if (!height || !width) {
label[overlayField].image = null;
return;
}

const imageData = new ImageData(
new Uint8ClampedArray(label[overlayField].image),
width,
Expand Down

0 comments on commit 781a4f1

Please sign in to comment.