I'm working on a project that involves retrieving images my code have no errors, but the images are displayed as image icon. Only one image is displayed.

```
$query = "SELECT * from cbir";
$result =mysql_query($query) or die('Error, query failed');

while($row = mysql_fetch_array($result)){
if (abs($red_count - $row['red_count'])> 50 && abs($blue_count - $row['blue_count'])> 50 && abs($green_count - $row['green_count'])> 50 ){
    header("content-type: image/jpeg");
    echo $row['image'];
}
}

```