Compare commits

..

No commits in common. "6a2a5f799729e2ee3cbd1255f2dd59ee9b56ff97" and "f403d4ffa8fe0fbeaf785c1eb4d80137994c2b9d" have entirely different histories.

2 changed files with 6 additions and 12 deletions

View File

@ -24,7 +24,7 @@ GrayScaleImageSeries *readImages(const char *path)
FILE *readSource;
unsigned int numberOfBytesToRead = 0;
const unsigned int amountOfStatusInfoToRead = 1;
char headerString[sizeof("__info2_image_file_format__\0")] = "";
char headerString[sizeof("__info2_image_file_format__")] = "__info2_image_file_format__";
//speicher allocaten weil *series auf null zeigt !!!!!!!!
@ -88,10 +88,10 @@ unsigned int readStatusInfo(FILE *source, char *const headerString, unsigned int
{
unsigned int bytesToRead = 0;
fread(headerString, sizeof("__info2_image_file_format__\0"), amountToRead, source);
fread(imageCount, 4, 1, source);
fread(imageWidth, sizeof(int), amountToRead, source);
fread(imageHeight, sizeof(int), amountToRead, source);
fread(headerString, sizeof(*headerString), amountToRead, source);
fread(imageCount, sizeof(*imageCount), amountToRead, source);
fread(imageWidth, sizeof(*imageWidth), amountToRead, source);
fread(imageHeight, sizeof(*imageHeight), amountToRead, source);
bytesToRead = (*imageWidth) * (*imageHeight);
// state of debugging:
@ -100,12 +100,7 @@ unsigned int readStatusInfo(FILE *source, char *const headerString, unsigned int
// return nonsensical numbers
// is the sizeof() command correct??
printf("hier\n");
printf("stringsize: %lld\n", sizeof(headerString));
printf("string: %send\n", headerString);
printf("count: %u\n", *imageCount);
printf("width: %u\n", *imageWidth);
printf("height %u\n", *imageHeight);
printf("bytes to read = %u\n", bytesToRead);
printf("bytes to read = %u", bytesToRead);
return bytesToRead;
}

View File

@ -1 +0,0 @@
some_tag