+static int identify(const RgbImage *base, Rect portion,
+ char result[MAXIMGIDENT], const char *what) {
+ return identify1(base,portion,result,what, "master") ||
+ identify1(base,portion,result,what, "local");
+}
+
+void fwrite_ppmraw(FILE *f, const RgbImage *ri) {
+ fprintf(f,
+ "P6\n"
+ "%d %d\n"
+ "255\n", ri->w, ri->h);
+ int count= ri->w * ri->h * 3;
+ sysassert( fwrite(ri->data, 1, count, f) == count );
+ sysassert(!ferror(f));
+ sysassert(!fflush(f));
+}
+