久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='50qya'></bdo><ul id='50qya'></ul>

<legend id='50qya'><style id='50qya'><dir id='50qya'><q id='50qya'></q></dir></style></legend>

    1. <small id='50qya'></small><noframes id='50qya'>

    2. <i id='50qya'><tr id='50qya'><dt id='50qya'><q id='50qya'><span id='50qya'><b id='50qya'><form id='50qya'><ins id='50qya'></ins><ul id='50qya'></ul><sub id='50qya'></sub></form><legend id='50qya'></legend><bdo id='50qya'><pre id='50qya'><center id='50qya'></center></pre></bdo></b><th id='50qya'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='50qya'><tfoot id='50qya'></tfoot><dl id='50qya'><fieldset id='50qya'></fieldset></dl></div>
    3. <tfoot id='50qya'></tfoot>
    4. 如何使用經(jīng)典 ASP 保存畫布圖像?

      How to save canvas image using classic ASP?(如何使用經(jīng)典 ASP 保存畫布圖像?)
    5. <tfoot id='k7r23'></tfoot>
      <i id='k7r23'><tr id='k7r23'><dt id='k7r23'><q id='k7r23'><span id='k7r23'><b id='k7r23'><form id='k7r23'><ins id='k7r23'></ins><ul id='k7r23'></ul><sub id='k7r23'></sub></form><legend id='k7r23'></legend><bdo id='k7r23'><pre id='k7r23'><center id='k7r23'></center></pre></bdo></b><th id='k7r23'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='k7r23'><tfoot id='k7r23'></tfoot><dl id='k7r23'><fieldset id='k7r23'></fieldset></dl></div>
        <legend id='k7r23'><style id='k7r23'><dir id='k7r23'><q id='k7r23'></q></dir></style></legend>
          <tbody id='k7r23'></tbody>
        • <bdo id='k7r23'></bdo><ul id='k7r23'></ul>

                <small id='k7r23'></small><noframes id='k7r23'>

              1. 本文介紹了如何使用經(jīng)典 ASP 保存畫布圖像?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我有點(diǎn)卡在這里.我知道我可以使用 canvas.toDataURL 生成一個(gè) base64 編碼的字符串,以傳遞給我服務(wù)器上的經(jīng)典 ASP 頁面.但我似乎找不到答案的問題是如何處理這些數(shù)據(jù),以便我可以將其保存在我的服務(wù)器上的某個(gè)位置.

                I'm a bit stuck here. I know that I can use the canvas.toDataURL to produce a base64 encoded string to pass to a classic ASP page on my server. But the problem I can't seem to find an answer to is how to process this data so I can save it someplace on my server.

                因此,使用我的 HTML 頁面上的這段代碼,我提取了畫布數(shù)據(jù)(我從 StackOverflow 的另一篇文章中提取了這個(gè)):

                So with this snippet of code on my HTML page, I pull the canvas data (I pulled this from another post here at StackOverflow):

                var dataURL = renderedCanvas.toDataURL("image/png");    
                dataURL = dataURL.replace('data:image/png;base64,', '');
                
                var areturn = $.ajax({
                  url: "http://127.0.0.1/mySite/saveImage.asp",
                  type: "POST",
                  data: '{ "imageData" : "' + dataURL + '" }',
                  dataType: "json",
                  beforeSend: function(x) {
                      x.overrideMimeType("application/j-son;charset=UTF-8");
                  }
                }).done(function(result) {
                    console.log("Success Done!
                " + result);
                }).always(function(data) {
                    console.log("Always:
                " + data.responseText);
                }); 
                

                但是我現(xiàn)在不清楚一旦我在服務(wù)器端如何處理數(shù)據(jù)......我可以提取 Request.Form 元素,但我似乎找不到任何 base64 解碼的好方法它,甚至將其輸出為二進(jìn)制文件...我想我聽說經(jīng)典的 ASP 不擅長進(jìn)行 base64 解碼,在另一個(gè)測(cè)試中我確實(shí)找到了一個(gè)可以進(jìn)行 base64 解碼的函數(shù),但我不能不知道它是否真的有效,但它確實(shí)需要很長時(shí)間才能運(yùn)行.我還在這里找到了這個(gè)鏈接:用于 ASP 經(jīng)典的 base64 圖像解碼器,但我猜這是微軟不推薦使用的 32 位組件……我想我正在向社區(qū)尋求有關(guān)將 html5 畫布圖像保存到服務(wù)器上的建議.

                But I'm unclear now what to do with the data once I'm on the server side... I can pull the Request.Form element, but I can't seem to find a good way to either base64 decode it, or even output it as a binary file... I guess I've heard that classic ASP isn't any good at doing base64 decoding, and in another test I did find a function that did the base64 decode, but I couldn't tell if it really worked, but it did take a long time to run. I also found this link here: base64 image decoder for ASP classic, but I guess this is a 32bit component that Microsoft doesn't recommend using... I guess I'm looking to the community here for suggestions on saving out an html5 canvas image onto the server.

                推薦答案

                您可以使用通過 DomDocument 實(shí)例創(chuàng)建的指定 bin.base64 數(shù)據(jù)類型的 XML 元素來編碼/解碼 Base64 數(shù)據(jù).
                然后,您可以使用 Stream 對(duì)象將獲得的二進(jìn)制文件保存到磁盤.
                這兩個(gè)庫都支持 64 位.假設(shè)您發(fā)送的內(nèi)容將在服務(wù)器端的 Request 集合(沒有 json 的經(jīng)典 post 方法等)中可用,下面的代碼可以解決問題,或者在最壞的情況下,我相信這會(huì)給您帶來洞察力.

                You could use an XML element specifying bin.base64 data type that created through a DomDocument instance to encoding / decoding Base64 data.
                Then you can save obtained binary to disk using a Stream object.
                Both of these libraries are 64 bit supported. Assuming the content you sent will be available in a Request collection (classic post methods without json etc.) on the server-side, following code solves the problem or at worst I'm sure that gives you insight.

                saveImage.asp

                Function Base64Data2Stream(sData)
                    Set Base64Data2Stream = Server.CreateObject("Adodb.Stream")
                        Base64Data2Stream.Type = 1 'adTypeBinary
                        Base64Data2Stream.Open
                    With Server.CreateObject("MSXML2.DomDocument.6.0").createElement("b64")
                        .dataType = "bin.base64"
                        .text = sData
                        Base64Data2Stream.Write .nodeTypedValue 'write bytes of decoded base64 to stream
                        Base64Data2Stream.Position = 0
                    End With
                End Function
                
                Dim CanvasStream
                Set CanvasStream = Base64Data2Stream(Request.Form("imageData"))
                
                'Write binary to Response Stream
                'Response.BinaryWrite CanvasStream.Read
                
                'Write binary to File
                CanvasStream.SaveToFile Server.Mappath("imgFileFromCanvas.png"), 2 'adSaveCreateOverWrite
                

                這篇關(guān)于如何使用經(jīng)典 ASP 保存畫布圖像?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 ajax 調(diào)用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                    <tbody id='FonZC'></tbody>
                  <tfoot id='FonZC'></tfoot>
                  <legend id='FonZC'><style id='FonZC'><dir id='FonZC'><q id='FonZC'></q></dir></style></legend>
                    <bdo id='FonZC'></bdo><ul id='FonZC'></ul>

                      <small id='FonZC'></small><noframes id='FonZC'>

                      • <i id='FonZC'><tr id='FonZC'><dt id='FonZC'><q id='FonZC'><span id='FonZC'><b id='FonZC'><form id='FonZC'><ins id='FonZC'></ins><ul id='FonZC'></ul><sub id='FonZC'></sub></form><legend id='FonZC'></legend><bdo id='FonZC'><pre id='FonZC'><center id='FonZC'></center></pre></bdo></b><th id='FonZC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FonZC'><tfoot id='FonZC'></tfoot><dl id='FonZC'><fieldset id='FonZC'></fieldset></dl></div>
                        • 主站蜘蛛池模板: 欧美日韩视频网站 | 国产欧美精品一区二区 | 成人一区二区三区视频 | 黄网站在线观看 | 国产精品久久久久9999鸭 | 国产伦精品一区二区三区精品视频 | 久久人 | 久久精品欧美视频 | 国产一区二区三区色淫影院 | 国产综合久久久久久鬼色 | 免费一区二区 | 国产欧美在线播放 | 国产午夜视频 | 精品久久久久久久久久久 | 一区二区三区精品视频 | 久久综合一区二区三区 | 亚洲一区 | 欧美在线观看一区 | 国产在线播放一区二区三区 | 日本在线播放一区二区 | 国产精品视频免费看 | 国产精品日韩欧美一区二区三区 | 天天爽夜夜操 | 欧美一区不卡 | 成人一级毛片 | 国产精品成人一区二区三区 | 国产日韩欧美精品一区二区三区 | 亚洲人成网亚洲欧洲无码 | 成人h视频 | 成人黄色av网站 | 久久精品91久久久久久再现 | 亚洲欧美日韩中文在线 | 99精品国产一区二区青青牛奶 | 91国内外精品自在线播放 | 精品9999| 色婷婷综合在线观看 | 日韩成人免费 | 久久亚洲一区二区 | 国产精品精品久久久 | 欧美成人精品在线观看 | 久久久精品视频一区二区三区 |