struct image *img1, *img2;
- image_io_init(&it, &io);
+ if (!image_io_init(&it, &io))
+ die("Cannot initialize image I/O (%s)", it.err_msg);
MSG("Reading %s", file_name_1);
io.fastbuf = bopen(file_name_1, O_RDONLY, 1 << 18);
io.format = format_1 ? : image_file_name_to_format(file_name_1);
dump_signature(&sig1);
dump_signature(&sig2);
- uns dist = image_signatures_dist(&sig1, &sig1);
+ uns dist = image_signatures_dist(&sig1, &sig2);
MSG("dist=%.6f", dist / (double)(1 << IMAGE_SIG_DIST_SCALE));
image_destroy(img1);