Click here to Skip to main content
15,906,467 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Bitmap bitmap = new Bitmap(imageToBeResized, imageWidth, imageHeight);//existing image Scaled to the specified size
                  System.IO.MemoryStream stream = new MemoryStream();   what this line do?
                  bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);what this line do?
                  stream.Position = 0;
                  //create a byte array to store the binary image data
             byte[] image = new byte[stream.Length+1];
              //set the binary data
              stream.Read(image, 0, image.Length);



plz explain code i do not understand what is meaning of Creates a stream whose

backingstore is menory
Posted

1 solution

How about msdn[^]? This explains what bitmap save method does.
It is persisting the bitmap image to the memory stream object.
 
Share this answer
 
Comments
Pong D. Panda 16-May-11 1:14am    
Weird thing about this poster is he asks questions about the code like 200 times a day. http://www.codeproject.com/script/Answers/MemberPosts.aspx?tab=questions&mid=7542037
Abhinav S 16-May-11 2:43am    
Ah I did not notice that at all.
Sandeep Mewara 16-May-11 1:29am    
You still reply him... you got tonnes of patience. :)
Abhinav S 16-May-11 2:43am    
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900