Grayscale image: Difference between revisions

Content deleted Content added
Updated D entry
Updated D entry
Line 270: Line 270:
}
}


scope(exit) if (fin) fclose(fin);
if (img is null)
if (img is null)
img = new Image!Color();
img = new Image!Color();


auto fin = fopen(fileName.toStringz(), "rb");
auto fin = fopen(fileName.toStringz(), "rb");
scope(exit) if (fin) fclose(fin);
if (!fin)
if (!fin)
throw new Exception("Can't open input file.");
throw new Exception("Can't open input file.");