|
-
Oct 20th, 2019, 10:00 PM
#3
Re: VB.NET Streaming Image Using Imag2Pipe Issue
Perhaps the problem is using the Save method.
I haven't messed with this, but it seems like a lot of effort with various unnecessary conversions, since it looks like you just want to write the bitmap data to the stream, so I don't see a reason to read the data into a bitmap and then save it, since it should already be a bitmap in the file.
Since I haven't done it, I could be completely wrong though.
But, if I were to try it, what I would have tried would be to read the bytes from the file, and then write the bytes to the stream, something along the lines of:
Code:
For Each strEachFile In strFiles
Me.Text = System.IO.Path.GetFileNameWithoutExtension(strEachFile)
Dim FileContents As Byte() = IO.File.ReadAllBytes(strEachFile)
o1.Write(FileContents, 0, FileContents.Length)
Next
I don't know if that would make any difference, but just sending the contents of all the files to the o1 stream would seem like what you are trying to do. Whether doing that is valid, I have no idea.
"Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|