Showing
1 changed file
with
0 additions
and
36 deletions
... | @@ -64,42 +64,6 @@ const GifEditor = ({ previewURL }) => { | ... | @@ -64,42 +64,6 @@ 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 | - | ||
103 | return ( | 67 | return ( |
104 | <Container> | 68 | <Container> |
105 | <div onClick={render} className="upload"> | 69 | <div onClick={render} className="upload"> | ... | ... |
-
Please register or login to post a comment