what happens if you replace this
byte[] imgdata = new byte[0];
imgdata = (byte[])dt.Rows[0][0];
MemoryStream ms = new MemoryStream(imgdata);
with this
MemoryStream ms = new MemoryStream(byte[])dt.Rows[0][0]);
Other things you could try are to write
(byte[])dt.Rows[0][0]
to a file on disk and see if its actually valid image, AND ONLY ONE image in the stream.
Do you keep the size of the original in a column in the database when its stored ? If so I'd compare that to the MemoryStream ms # of bytes
This construct :-
Image.FromStream()
can also be an 'issue' if the Image class cannot determine the type of the image - png or bmp for example