Class
- Tip&Tech
[±âŸ] ±×³É ½É½ÉÇؼ ¸¸µé¾î º» ¾ÆÀÌÆù¿¡¼ ¾´ ¼Õ±Û¾¾¸¦ À̹ÌÁö·Î ÀúÀåÇϱâ | |||||
±Û¾´ÀÌ | ´ÚÅÍ | ³¯ Â¥ | 10-04-01 11:48 | Á¶ ȸ | 9785 |
---|---|---|---|---|---|
°£ÆíURL |
https://www.phpschool.com/link/tipntech/71649
|
||||
Á¦¸ñÀÌ Á» ¸Þ·ÕÇѵ¥¿ä....
¿äÁö´Â ¾ÆÀÌÆù¿¡¼ ¼ÕÀ¸·Î ¾´ ±ÛÀ» À̹ÌÁö·Î ÀúÀåÇϴ°Š¿ø·¡´Â Àú À̹ÌÁö¸¦ ºÐ¼®Çؼ ¹®ÀÚÀνÄÀ¸·Î ¸¸µé°í ½ÍÀºµ¥.......ÀÌ·± ¤Ô¤¶¤È¤· ocr Á¶³½ ¾î·Æ ³×¿ä... ³»°øÀ» ´õ ´Û¾Æ¾ß ÇÒµí.... Áö ¸ø¹Ì...OTL Áö¿ø ºê¶ó¿ìÁ®´Â Å©·Ò, »çÆĸ®, ÆÄÆøÀÔ´Ï´Ù. ±×·±µ¥ ÆÄÆø¿¡¼´Â Á» ¹º°¡ ÀÌ»óÇϳ׿ä^^;; canvasÇÔ¼ö¸¦ ÀÌ¿ëÇϴ°ÍÀ̶ó¼ ie´Â ÄðÇÏ°Ô Æо²!!! ¾ÆÀÌÆù¿¡¼ Çغ¸¼¼¿ä~~^^ ¾ÏÆ° ¼Ò½º¸¦ ÀÌ·¸½À´Ï´Ù µ¥ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test</title> <meta http-equiv="Progma" content="on-cache" /> <meta http-equiv="Expires" content="-1" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no;" /> <style type="text/css"> #stage { border:1px #DDD solid; } #link{ text-align:center; border:2px solid; border-color:red; } #closed{ border:1px solid; } </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> var started = false; var canvas, context; //ÃʱâÈ ÇÔ¼ö function init(){ canvas = document.getElementById('stage'); context = canvas.getContext('2d'); started = false; //¾ÆÀÌÆùÀÎÁö ÆǺ° var ua = navigator.userAgent; if(ua.indexOf('iPhone') > 0){ canvas.addEventListener('touchstart', function(e){ context.beginPath(); context.moveTo(e.targetTouches[0].pageX - 8, e.targetTouches[0].pageY - 8); started = true; }); canvas.addEventListener('touchmove', function(e){ if(started == true){ e.preventDefault(); context.lineTo(e.targetTouches[0].pageX - 8, e.targetTouches[0].pageY - 8); context.stroke(); } $("#debug").html(e.targetTouches[0].pageX + "/ " + e.targetTouches[0].pageY ); }); canvas.addEventListener('touchend', function(e){ if(started == true){ started = false; } }); }else{ canvas.onmousedown = function(e){ context.beginPath(); context.moveTo(e.clientX - 8, e.clientY - 8); started = true; }; canvas.onmousemove = function(e){ if(started == true){ context.lineTo(e.clientX - 8, e.clientY - 8); context.stroke(); } }; canvas.onmouseup = function(e){ if(started == true){ started = false; } }; }//end else };//end init(); //À̹ÌÁö ÃßÃâ function ExtractImage(){ var strDataURI = canvas.toDataURL("image/jpeg"); //À̹ÌÁö µ¥ÀÌŸ¸¦ Àü¼ÛÈÄ php¿¡¼ À̹ÌÁö·Î ÀúÀå $.ajax({ type: "POST", url : "ExtractImage.php", data : { data : strDataURI }, success : function(data){ $("#image").html(data); $("#image").append('<img src="' + strDataURI + '">'); $("#link").css({ "display" : "block" }); } }); } $(function(){ init(); //ÃʱâȽÇÇà //Ŭ¸¯½Ã ·¹ÀÌ¾î ´Ý±â $("#closed").click(function(){ $("#link").css({ "display" : "none" }); $("#image").html(""); }); }); </script> </head> <body> <div id="container"> <canvas id="stage" width="300" height="270"></canvas> </div> <a href="javascript:ExtractImage();">À̹ÌÁöÃâ·Â</a> <a href="javascript:document.location.reload();">ÃʱâÈ</a> <br><br> <div id="link" style="display:none;"> <div id="image"> </div> <span id="closed">´Ý±â</span> <br><br> </div> <div id="debug"></div> </body> </html> À̹ÌÁö¸¦ ÀúÀåÇÏ´ÂÂÊÀº //ÇØ´ç À̹ÌÁö ÀúÀå session_start(); $name = session_id(); $dataurl = str_replace(" ", "+", $_POST["data"]); $data = substr($dataurl, strpos($dataurl , ",")); $file = fopen("./image/".$name.".jpg", "wb"); fwrite($file, base64_decode($data)); fclose($file); echo "<br><a href=\"http://drst3in.potatoweb.net/iphone/image/".$name.".jpg\"> À̹ÌÁö ´Ù¿î·Îµå </a>"; -------------------------------------------------------------------------------- ´© °¡ ocrÁ» ÇÏ´Â »ç¶÷ÀÖÀ¸¸é Á»ÇØÁà~~~~ µ¥¸ð´Â http://drst3in.potatoweb.net/iphone |
|||||
|
Àüü´ñ±Û¼ö 8
-
¾ðÁ¦µ·¹ú¾îÀå°¡°¡³² 10-04-01 12:06
¼Ò½ºº¸±â
- ¾ÆÀÌÆù ¾ø´Â »ç¶÷Àº Å×½ºÆ® ¸øÇϴ°ÅÀÓ?
-
¾ðÁ¦µ·¹ú¾îÀå°¡°¡³² 10-04-01 12:11
¼Ò½ºº¸±â
-
IE6 /IE7 /IE8 ¾ÈµÊ
FF À̹ÌÁöÃâ·Â Àüü ±î¸Ä°Ô ³ª¿È
»çÆĸ® À̹ÌÁöÃâ·Â Ŭ¸¯½Ã ¹ÝÀÀ¾øÀ½
¿ÀÆä¶ó ÀßµÊ
Å©·Ò ÀßµÊ
-
´ÚÅÍ 10-04-01 12:18
¼Ò½ºº¸±â
- ³× ¸î¸î ºê¶ó¿ìÁ®¿¡¼ ¹®Á¦°¡ ÀÖ´õ±º¿ä ¿ø·¡ ÃëÁö°¡ ¾ÆÀÌÆù¿¡ ¸Â°ÔÇÏ´Â °ÍÀÌ¿©¼^^;; ÄðÇÏ°Ô Æо²~~
1 2 3 4 5 6 7 8 9 10