How to use System.IO.Stream 
Author Message
 How to use System.IO.Stream

I write this :

    Dim oImage As System.Drawing.Image
    Dim oStream As System.IO.Stream
    [...]
    oImage.Save(oStream, System.Drawing.Imaging.ImageFormat.Gif)

And I obtain when I run :

    Value cannot be null. on the line : oImage.Save(oStream...

How to use Stream ?



Fri, 11 Mar 2005 21:46:40 GMT  
 How to use System.IO.Stream

Quote:
>     Dim oStream As System.IO.Stream

Should this be Dim oStream As New System.IO.Stream   ???

--
If you don't like lunchmeat, please remove it from my e-mail address to
send me an e-mail



Sat, 12 Mar 2005 06:05:01 GMT  
 How to use System.IO.Stream

Quote:
> Should this be Dim oStream As New System.IO.Stream   ???

It doesn't work, because my class is declared MustInherit...

a piece of code :

    Dim oImage As Image
    Dim oStream As System.IO.Stream

    [...]

    oImage.Save(oStream, oImage.RawFormat)

when RUN :

    exception 'System.ArgumentNullException'
    Value cannot be null.



Sat, 12 Mar 2005 23:46:43 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. A better solution please (System.IO.Stream related)

2. File locks when deleting files using SYSTEM.IO

3. How _copy_ a directory using System.IO

4. Map Dive Using System.IO

5. DX9 - Playing a streaming sound from a memory stream (not file stream)

6. System.IO.FileNotFoundException and imageupload

7. trouble with system.io.file.copy

8. System.IO.FileNotFoundException

9. System.IO.StreamReader

10. System.IO.PathTooLongException

11. System.IO.FileNotFoundException

12. System.IO question

 

 
Powered by phpBB® Forum Software