error while converting the byte arry to image ,after modifying the byte array and the byte array is
        Posted  
        
            by geehta
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by geehta
        
        
        
        Published on 2010-05-10T06:35:50Z
        Indexed on 
            2010/05/10
            6:44 UTC
        
        
        Read the original article
        Hit count: 232
        
Hi,
this is my code. Here i hv formed the byte array of img, i am trying to add some vlue to this byte array say 10 and i'll take care that the value is not exceeding 255. later if i try to redraw the image via the following code i am getting error at this line... what can be the problem.. without modification if i try to draw the image it is coming but if i cahnge some value it is not drawing..
public Image btoi(byte[] bt)
{
    ms = new MemoryStream(bt, 0, bt.Length);
    img = Image.FromStream (ms, true); // error at this line
    ms.Close();
    return img;
}
© Stack Overflow or respective owner