B
Bruce D
I have two methods to write to the database. The first one saves the file
to disk the re-reads it and then inserts it. This way works...at least I'm
able to read the image when I retrieve it.
The second way (the way I want to do it) does not work...it saves it...but I
can't read the image when I retrieve it.
I'm guessing it has something to do with the amount of data that is stored
in the byte... any ideas??
1)
tImage.Save("c:\temp\xfile.tif",
System.Drawing.Imaging.ImageFormat.Tiff)
Dim st As New System.IO.FileStream("c:\temp\xfile.tif",
IO.FileMode.Open, IO.FileAccess.Read)
Dim abyte(st.Length) As Byte
st.Read(abyte, 0, st.Length - 1)
st.Close()
2)
Dim ms As New System.IO.MemoryStream
tImage.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff)
Dim abyte(ms.Length) As Byte
ms.Read(abyte, 0, ms.Length - 1)
ms.Close()
-bruce duncan
to disk the re-reads it and then inserts it. This way works...at least I'm
able to read the image when I retrieve it.
The second way (the way I want to do it) does not work...it saves it...but I
can't read the image when I retrieve it.
I'm guessing it has something to do with the amount of data that is stored
in the byte... any ideas??
1)
tImage.Save("c:\temp\xfile.tif",
System.Drawing.Imaging.ImageFormat.Tiff)
Dim st As New System.IO.FileStream("c:\temp\xfile.tif",
IO.FileMode.Open, IO.FileAccess.Read)
Dim abyte(st.Length) As Byte
st.Read(abyte, 0, st.Length - 1)
st.Close()
2)
Dim ms As New System.IO.MemoryStream
tImage.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff)
Dim abyte(ms.Length) As Byte
ms.Read(abyte, 0, ms.Length - 1)
ms.Close()
-bruce duncan