Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
MAC_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2021-05-11 17:05:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7f36d25a87931ed20c6b1a4bc451c169b86ff808
7f36d25a
1 parent
72fbe751
conflict
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
src/components/GifEditor.tsx
src/components/GifEditor.tsx
View file @
7f36d25
...
...
@@ -64,42 +64,6 @@ const GifEditor = ({ previewURL }) => {
);
};
// useEffect(() => {
// // const img = lowerCanvas?.toDataURL("image/png");
// // const uploaded = document.getElementById("image");
// // console.log(uploaded);
// // let w = window.open();
// // if (w?.window) w.document.body.innerHTML = "<img src='" + img + "'>";
// const image = new Image();
// // image.onload = function () {
// // lowerCanvas.width = uploaded.clientWidth;
// // lowerCanvas.height = uploaded.clientHeight;
// // lowerCanvas?.getContext("2d").drawImage(image, 0, 0);
// // };
// image.src = previewURL;
// console.log("canvascontext", canvas?.getContext);
// if (canvas?.getContext) {
// console.log('왜안돼')
// image.onload = function () {
// canvas.width = 1000;
// canvas.height = 572;
// canvas?.getContext("2d").drawImage(image, 0, 0);
// };
// // console.log(canvas.getContext("2d"));
// }
// }, [canvas]);
const render = () => {
gifGenerator.make().then(
(blob) => {
window.open(window.URL.createObjectURL(blob));
},
(error) => {
alert(error);
}
);
};
return (
<Container>
<div onClick={render} className="upload">
...
...
Please
register
or
login
to post a comment