In the mysql table, MyISAMenter the Imagetype column mediumbloband save the captured image. I have interesting and problematic images. Some of the images are data gradually losing.
Field type
--------------------------
image mediumblob
my.ini max allow packet size max_allowed_packet = 8M



This is problem
When the application C#retrieves data from the server every time these images lose data gradually and randomly. I got 10-12bad images like this in 100000+image data.
What could be causing this behavior? Anyone have an idea / solution on how to fix / avoid this problem.
Update 1:
Reading Bytes of a PictureBox Form
MemoryStream ms = new MemoryStream();
byte[] ret = null;
try
{
picturebox.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] Data = new byte[ms.Length];
ms.Read(Data, 0, (int)ms.Length);
ret = byteData;
ms.Close();
}
blob.
byte[] Data = (byte[])reader["Image"];