오윤석

Merge branch 'feat/web' of http://khuhub.khu.ac.kr/2021-1-capstone-design1/MAC_P…

…roject1 into feat/web

# Conflicts:
#	src/components/GifEditor.tsx
...@@ -64,6 +64,42 @@ const GifEditor = ({ previewURL }) => { ...@@ -64,6 +64,42 @@ const GifEditor = ({ previewURL }) => {
64 ); 64 );
65 }; 65 };
66 66
67 + // useEffect(() => {
68 + // // const img = lowerCanvas?.toDataURL("image/png");
69 + // // const uploaded = document.getElementById("image");
70 + // // console.log(uploaded);
71 + // // let w = window.open();
72 + // // if (w?.window) w.document.body.innerHTML = "<img src='" + img + "'>";
73 + // const image = new Image();
74 + // // image.onload = function () {
75 + // // lowerCanvas.width = uploaded.clientWidth;
76 + // // lowerCanvas.height = uploaded.clientHeight;
77 + // // lowerCanvas?.getContext("2d").drawImage(image, 0, 0);
78 + // // };
79 + // image.src = previewURL;
80 + // console.log("canvascontext", canvas?.getContext);
81 + // if (canvas?.getContext) {
82 + // console.log('왜안돼')
83 + // image.onload = function () {
84 + // canvas.width = 1000;
85 + // canvas.height = 572;
86 + // canvas?.getContext("2d").drawImage(image, 0, 0);
87 + // };
88 + // // console.log(canvas.getContext("2d"));
89 + // }
90 + // }, [canvas]);
91 +
92 + const render = () => {
93 + gifGenerator.make().then(
94 + (blob) => {
95 + window.open(window.URL.createObjectURL(blob));
96 + },
97 + (error) => {
98 + alert(error);
99 + }
100 + );
101 + };
102 +
67 return ( 103 return (
68 <Container> 104 <Container>
69 <div onClick={render} className="upload"> 105 <div onClick={render} className="upload">
......