ASP.NET and GDI+

Finishing Up

Now for the final, the aspx output...

We called the following function from our previous function in the previous function, now this just writes raw data to the "page" which gets interpreted by IE as image data and gets displayed.

     Private Function DisplayImage(ByVal bBitmap As FileStream)
         
         Dim FileSize As Long
         FileSize = bBitmap.Length '# For the buffer length

         '# Read the data and add it to a buffer...
         Dim Buffer(CInt(FileSize)) As Byte
         bBitmap.Read(Buffer, 0, CInt(FileSize))
         bBitmap.Close()

         '# And Finally...
         Response.BinaryWrite(Buffer)
         '# Writing the image to screen...
     
    End Function

Well that is that, I hope you all enjoyed my tutorial and I hope it was informative...

The StormChild...

p.s. there is no copyright or nonsense on my code, it's just words, I'll appreciate it though everytime you mention me in it, it might just propegate my virtual immortallity <whatever> ;)

You might also like...

Comments

About the author

Ruan Meyer

Ruan Meyer Saudi Arabia

erm, what can I say... not much, 'cept that I like music, nwn, dnd, programming (C, C++, C#, VB) etc. and Jack Daniels... ;) oh yes and girls...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“To iterate is human, to recurse divine” - L. Peter Deutsch