68
68
dumpCineonFileInfo(CineonFileInformation* fileInfo) {
69
69
d_printf("\n--File Information--\n");
70
d_printf("Magic: %8.8lX\n", ntohl(fileInfo->magic_num));
71
d_printf("Image Offset %ld\n", ntohl(fileInfo->image_offset));
72
d_printf("Generic Header size %ld\n", ntohl(fileInfo->gen_hdr_size));
73
d_printf("Industry Header size %ld\n", ntohl(fileInfo->ind_hdr_size));
74
d_printf("User Data size %ld\n", ntohl(fileInfo->user_data_size));
75
d_printf("File size %ld\n", ntohl(fileInfo->file_size));
70
d_printf("Magic: %8.8lX\n", (unsigned long)ntohl(fileInfo->magic_num));
71
d_printf("Image Offset %ld\n", (long)ntohl(fileInfo->image_offset));
72
d_printf("Generic Header size %ld\n", (long)ntohl(fileInfo->gen_hdr_size));
73
d_printf("Industry Header size %ld\n", (long)ntohl(fileInfo->ind_hdr_size));
74
d_printf("User Data size %ld\n", (long)ntohl(fileInfo->user_data_size));
75
d_printf("File size %ld\n", (long)ntohl(fileInfo->file_size));
76
76
d_printf("Version \"%s\"\n", fileInfo->vers);
77
77
d_printf("File name \"%s\"\n", fileInfo->file_name);
78
78
d_printf("Creation date \"%s\"\n", fileInfo->create_date);
112
112
default: d_printf(" (unknown)\n"); break;
114
114
d_printf(" Bits per pixel %d\n", chan->bits_per_pixel);
115
d_printf(" Pixels per line %ld\n", ntohl(chan->pixels_per_line));
116
d_printf(" Lines per image %ld\n", ntohl(chan->lines_per_image));
117
d_printf(" Ref low data %ld\n", ntohl(chan->ref_low_data));
115
d_printf(" Pixels per line %ld\n", (long)ntohl(chan->pixels_per_line));
116
d_printf(" Lines per image %ld\n", (long)ntohl(chan->lines_per_image));
117
d_printf(" Ref low data %ld\n", (long)ntohl(chan->ref_low_data));
118
118
d_printf(" Ref low quantity %f\n", ntohf(chan->ref_low_quantity));
119
d_printf(" Ref high data %ld\n", ntohl(chan->ref_high_data));
119
d_printf(" Ref high data %ld\n", (long)ntohl(chan->ref_high_data));
120
120
d_printf(" Ref high quantity %f\n", ntohf(chan->ref_high_quantity));
232
232
d_printf(" positive\n");
234
d_printf("End of line padding %ld\n", ntohl(formatInfo->line_padding));
235
d_printf("End of channel padding %ld\n", ntohl(formatInfo->channel_padding));
234
d_printf("End of line padding %ld\n", (long)ntohl(formatInfo->line_padding));
235
d_printf("End of channel padding %ld\n", (long)ntohl(formatInfo->channel_padding));
257
257
dumpCineonOriginationInfo(CineonOriginationInformation* originInfo) {
258
258
d_printf("\n--Origination Information--\n");
259
d_printf("X offset %ld\n", ntohl(originInfo->x_offset));
260
d_printf("Y offset %ld\n", ntohl(originInfo->y_offset));
259
d_printf("X offset %ld\n", (long)ntohl(originInfo->x_offset));
260
d_printf("Y offset %ld\n", (long)ntohl(originInfo->y_offset));
261
261
d_printf("File name \"%s\"\n", originInfo->file_name);
262
262
d_printf("Creation date \"%s\"\n", originInfo->create_date);
263
263
d_printf("Creation time \"%s\"\n", originInfo->create_time);
525
525
/* let's assume cineon files are always network order */
526
526
if (header.fileInfo.magic_num != ntohl(CINEON_FILE_MAGIC)) {
527
527
if (verbose) d_printf("Bad magic number %8.8lX in \"%s\".\n",
528
ntohl(header.fileInfo.magic_num), filename);
528
(unsigned long)ntohl(header.fileInfo.magic_num), filename);
529
529
cineonClose(cineon);
625
625
/* let's assume cineon files are always network order */
626
626
if (header.fileInfo.magic_num != ntohl(CINEON_FILE_MAGIC)) {
627
if (verbose) d_printf("Bad magic number %8.8lX in\n", ntohl(header.fileInfo.magic_num));
627
if (verbose) d_printf("Bad magic number %8.8lX in\n", (unsigned long)ntohl(header.fileInfo.magic_num));
629
629
cineonClose(cineon);
663
663
i = cineon->imageOffset;
665
if (logimage_fseek(cineon, cineon->imageOffset, SEEK_SET) != 0) {
666
666
if (verbose) d_printf("Couldn't seek to image data at %d\n", cineon->imageOffset);
667
667
cineonClose(cineon);
670
671
cineon->fileYPos = 0;
672
673
logImageGetByteConversionDefaults(&cineon->params);