generated from freudenreichan/info2Praktikum-NeuronalesNetz
Added file opening sequence
This commit is contained in:
parent
8676389e62
commit
ed304e3e60
@ -34,7 +34,7 @@ void allocateMemory(GrayScaleImageSeries *s, const int imageCount, const int wid
|
||||
// TODO Vervollständigen Sie die Funktion readImages unter Benutzung Ihrer Hilfsfunktionen
|
||||
GrayScaleImageSeries *readImages(const char *path)
|
||||
{
|
||||
FILE * file;
|
||||
FILE* file = fopen(path, "rb");
|
||||
// TODO open binary file from file name
|
||||
GrayScaleImageSeries *series = NULL;
|
||||
if(!(checkString(file)))
|
||||
@ -45,6 +45,7 @@ GrayScaleImageSeries *readImages(const char *path)
|
||||
setParameters(file, imageCount, &(series->images->width), &(series->images->height));
|
||||
allocateMemory(series, *imageCount, series->images->width, series->images->height);
|
||||
|
||||
fclose(file);
|
||||
return series;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user