variablen Namen angepasst
This commit is contained in:
parent
47ff0906cc
commit
db7617e046
@ -13,13 +13,13 @@ static void prepareImageFile(const char *path, unsigned short int width, unsigne
|
||||
if(file != NULL)
|
||||
{
|
||||
const char *fileTag = "__info2_image_file_format__";
|
||||
GrayScalePixelType *Buffer = (GrayScalePixelType *)calloc(numberOfImages * width * height, sizeof(GrayScalePixelType));
|
||||
GrayScalePixelType *buffer = (GrayScalePixelType *)calloc(numberOfImages * width * height, sizeof(GrayScalePixelType));
|
||||
|
||||
if(Buffer != NULL)
|
||||
if(buffer != NULL)
|
||||
{
|
||||
for(unsigned int i = 0; i < (numberOfImages * width * height); i++)
|
||||
{
|
||||
Buffer[i] = (GrayScalePixelType)i;
|
||||
buffer[i] = (GrayScalePixelType)i;
|
||||
}
|
||||
|
||||
fwrite(fileTag, sizeof(fileTag[0]), strlen(fileTag), file);
|
||||
@ -29,11 +29,11 @@ static void prepareImageFile(const char *path, unsigned short int width, unsigne
|
||||
|
||||
for(int i = 0; i < numberOfImages; i++)
|
||||
{
|
||||
fwrite(Buffer, sizeof(GrayScalePixelType), width * height, file);
|
||||
fwrite(buffer, sizeof(GrayScalePixelType), width * height, file);
|
||||
fwrite(&label, sizeof(unsigned char), 1, file);
|
||||
}
|
||||
|
||||
free(Buffer);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user