Reputation: 3764
I have a site I've built, and I just can't see the images there in IE only. In chrome it works:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Report</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<table>
<tr>
<td align="left">
<img width="215" height="62" src="Report_files/image293.png" />
</td>
<td align="right">
<img width="257" height="75" src="Report_files/image310.jpg" />
</td>
</tr>
</table>
<img width="776" height="9" src="Report_files/image318.gif" />
<br />
<div style="text-align: center;">
Report - Protein Expression<br />
1111111111 <br /><br />
</div>
<div>
Application Details<br />
Application: Protein Expression<br />
<img width="382" height="245" src="Report_files/Plate.gif" /><br />
</div>
</body>
</html>
I can see the first three images, but not the Plate.gif one.
EDIT: Actually, I cannot see this image in internet explorer at all even when directly accessing it!
EDIT 2: I found out that I create the image using C# code. My guess is that the images are created with a wrong header or something. Here is the code:
Size size = new Size( panelPlateDrawing1.Size.Width + ucColorMapLegend1.Size.Width,
Math.Max(panelPlateDrawing1.Size.Height, ucColorMapLegend1.Size.Height) );
Bitmap img = new Bitmap(size.Width, size.Height);
panelPlateDrawing1.DrawToBitmap(img, new Rectangle(0, 0, panelPlateDrawing1.Size.Width, panelPlateDrawing1.Size.Height));
ucColorMapLegend1.DrawToBitmap(img, new Rectangle(panelPlateDrawing1.Size.Width, 0, ucColorMapLegend1.Size.Width, ucColorMapLegend1.Size.Height));
return img;
Upvotes: 1
Views: 886
Reputation: 2817
Usually when Internet Explorer (or any browser) doesn't show an image, it's because it's in a format it doesn't understand, and as you don't show how you're saving these images to disk, probably, as you already guessed, they're with the worng headers or information; to solve it you need to save them in the proper format, more information about how to do this can be seen here: Bmp to jpg/png in C#
Upvotes: 1