[완료] 동적으로 생성 된 배열을 fwrite() 로 저장하려는데 올바르지 않은 값이 생성됩니다.

wonjaein의 이미지

void dynamicFileOutPut(int row, int column, unsigned char **image, char outroot[])
{
printf("%d row, %d column\n", row, column);
FILE *doutfile;
doutfile = fopen(outroot, "wb");
fwrite(image, sizeof(char), row * column, doutfile);
fclose(doutfile);

}//end function

이차원 배열을 동적으로 생성하려 적당한 파일처리를 한 후
배열을 저장하려 합니다.

그런데 파일이 저장이 되기는 하는데 올바르지 않은 값을 보이는데 원인을 잘 모르겠습니다.

고수님들의 조언 부탁 드립니다.