- return identify1(base,portion,result,what, "master") ||
- identify1(base,portion,result,what, "local");
+ return identify1(base,portion,result,what, "master", dbfile_gzopen) ||
+ identify1(base,portion,result,what, "local", dbfile_open);
+}
+
+void fwrite_ppmraw(FILE *f, const RgbImage *ri) {
+ int i;
+ fprintf(f,
+ "P6\n"
+ "%d %d\n"
+ "255\n", ri->w, ri->h);
+ for (i=0; i < ri->w * ri->h; i++) {
+ Rgb rgb= ri->data[i];
+ fputc_unlocked(rgb >> 0, f);
+ fputc_unlocked(rgb >> 8, f);
+ fputc_unlocked(rgb >> 16, f);
+ }
+ sysassert(!ferror(f));
+ sysassert(!fflush(f));