Skip to content

Commit

Permalink
fix unraveling of index
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Rath committed Jan 2, 2024
1 parent 1dada73 commit 9bb331a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ImageCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ Task<shared_ptr<CanvasStatistics>> ImageCanvas::computeCanvasStatistics(
tasks.emplace_back(
ThreadPool::global().parallelForAsync<size_t>(0, numPixels, [&, i](size_t j) {
int x = (j % regionSize.x()) + region.min.x();
int y = (j / regionSize.y()) + region.min.y();
int y = (j / regionSize.x()) + region.min.y();
indices[j + i * numPixels] = valToBin(channel.at(Vector2i{x, y}));
}, priority)
);
Expand Down

0 comments on commit 9bb331a

Please sign in to comment.