Skip to content

Commit

Permalink
remove debug image
Browse files Browse the repository at this point in the history
  • Loading branch information
mac authored and mac committed Oct 4, 2024
1 parent b761846 commit 9a25f1f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ export function App() {
}, []);

// Process image when both templates and engine are ready
useEffect(() => {
if (templates && engine) {
loadAndProcessDebugImage(templates);
}
}, [templates, engine]);

const loadAndProcessDebugImage = (templates: Record<PieceName, cv.Mat>) => {
const img = new Image();
img.onload = () => {
processImage(img, templates);
};
img.src = `${import.meta.env.BASE_URL}test.png`;
};
// useEffect(() => {
// if (templates && engine) {
// loadAndProcessDebugImage(templates);
// }
// }, [templates, engine]);

// const loadAndProcessDebugImage = (templates: Record<PieceName, cv.Mat>) => {
// const img = new Image();
// img.onload = () => {
// processImage(img, templates);
// };
// img.src = `${import.meta.env.BASE_URL}test.png`;
// };

const processImage = (img: HTMLImageElement, templates: Record<PieceName, cv.Mat>) => {
setOriginalImageSize({ width: img.width, height: img.height });
Expand Down

0 comments on commit 9a25f1f

Please sign in to comment.