I tried this code, but not working From Using Statement.

```
var database = Sitecore.Configuration.Factory.GetDatabase("master");
var images = database.SelectItems("/sitecore/media library/Corsair/Home Page/*");
foreach (var image in images)
     {
       var mediaItem = (MediaItem)image;
       var media = MediaManager.GetMedia(mediaItem);
       var stream = media.GetStream();
       using (var targetStream = File.OpenWrite(Path.Combine(@"F:\folder", image.Name + ".jpeg" )))
       {
           stream.CopyTo(targetStream);
           targetStream.Flush();
       }
     } 

```