| <!--METADATA TYPE="TypeLib" UUID="{EF53050B-882E-4776-B643-EDA472E8E3F2}" -->
<%
Call Response.AddHeader( "Content-Type", "text/html; Charset=shift_jis" )
Set Stream = Server.CreateObject("ADODB.Stream")
Set CAPIUtil = Server.CreateObject( "CAPICOM.Utilities" )
Stream.Open
Stream.Type = adTypeBinary
Stream.LoadFromFile Server.MapPath( "sample.jpg" )
strFile = CAPIUtil.ByteArrayToBinaryString( Stream.Read )
Stream.Close
strEncoded = CAPIUtil.Base64Encode( strFile )
' バイナリデータを通常文字列として処理
strDecoded = CAPIUtil.Base64Decode( strEncoded )
strFile2 = CAPIUtil.BinaryStringToByteArray( strDecoded )
Stream.Open
Stream.Type = adTypeBinary
Stream.Write strFile2
Stream.SaveToFile Server.MapPath("sample2.jpg"), _
adSaveCreateOverWrite
Stream.Close
%>
| |