我试图将我的图片值复制到文本文件。我的代码如下。
If fldtype = "System.Byte[]" Then
Dim bits As Byte() = CType(drow(dc), Byte())
Using ms As New MemoryStream(bits)
Dim sw As New StreamWriter(ms)
Dim sr As New StreamReader(ms)
Dim myStr As String = sr.ReadToEnd()
MessageBox.Show(myStr)
fldvalue = fldvalue + "," + myStr
End Using
答案 0 :(得分:0)
我发现这是将@foreach($categoryArticles->articles as $article)
<div class="col-6 col-lg-4"> <!--Post -->
<img src="{{ asset('upload/image/1.jpg') }}" width="255" alt="..." class="rounded img_size">
<h4> {{ $article->title }}</h4>
<h6>Category: <a href="/"> {{ $categoryArticles->name }}</a></h6>
<h6>Author: {{ $article->author }}</h6>
<p>{{ $article->text }} </p>
<p><a class="btn btn-secondary" href="{{ route('articleShow', ['id' =>$article->id]) }}"> More »</a></p>
</div><!--EndPost-->
@endforeach
写入字符串的最简单方法之一:
Byte[]
反过来也是如此:
If fldtype = "System.Byte[]" Then
Dim bits As Byte() = CType(drow(dc), Byte())
Dim s As String = Convert.ToBase64String(bits)
End If
answer linked in the original comments可能被证明是更好的选择。回答这些问题会有很长的路要走:
问题#3特别重要,因为您捕获的信息在图像格式信息方面很重要。这可能会丢失,因此难以100%重建原始图像。