Some tweaks to spandsp tests. Make spandsp write TIFF files more like the

TIFF/FX spec says, even though no software seems to care.
This commit is contained in:
Steve Underwood
2012-09-07 00:41:41 +08:00
parent 4cb0e2e5bd
commit cc73cb6544
7 changed files with 36 additions and 25 deletions
@@ -623,6 +623,10 @@ int main(int argc, char *argv[])
tm->tm_sec);
TIFFSetField(tiff_file, TIFFTAG_DATETIME, buf);
image_length = sequence[i].length;
TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
TIFFSetField(tiff_file, TIFFTAG_IMAGELENGTH, image_length);
TIFFCheckpointDirectory(tiff_file);
/* Write the image first.... */
switch (sequence[i].type)
@@ -662,8 +666,6 @@ int main(int argc, char *argv[])
}
/* ....then the directory entry, and libtiff is happy. */
TIFFSetField(tiff_file, TIFFTAG_IMAGELENGTH, image_length);
TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
TIFFWriteDirectory(tiff_file);
}
@@ -137,6 +137,7 @@ int main(int argc, char *argv[])
TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, image_width);
TIFFCheckpointDirectory(tiff_file);
/* Write the image first.... */
for (row = 0; row < image_length; row++)
@@ -367,6 +367,7 @@ int main(int argc, char *argv[])
TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, sequence[i].width);
TIFFCheckpointDirectory(tiff_file);
/* Write the image first.... */
for (row = 0; row < sequence[i].length; row++)
@@ -103,6 +103,7 @@ int main(int argc, char *argv[])
TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, IMAGE_WIDTH);
TIFFSetField(tiff_file, TIFFTAG_IMAGELENGTH, IMAGE_LENGTH);
TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
TIFFCheckpointDirectory(tiff_file);
image_size = IMAGE_WIDTH*ROWS_PER_STRIPE/8;
memset(image_buffer, 0x18, image_size);