I am trying to download images (jpg, jpeg and png). But when the size exceeds 200,000 bytes, I'm getting a black and white picture.
My code:
byte[] fileBytes;
try
{
path = url + path;
fileBytes = (new WebClient()).DownloadData(path);
}
catch
{
path = urlNoimagefound;
fileBytes = (new WebClient()).DownloadData(path);
}
...
// and then I add byte in rdlc
I think I'm getting a black and white picture because of the size of the byte array.
How to fix that?
Thank you.