chiark / gitweb /
Do not mention bpp in mustfail1 since we check it ourselves nowadays
[ypp-sc-tools.db-live.git] / pctb / structure.c
index c54f89a13c35aa3a4b8bc7ef4dda73b1bc665fb3..859c7d91d9fa3f3e0b8722aed2f942ed7c8ec190 100644 (file)
@@ -128,7 +128,6 @@ static void mustfail1(const char *file, int line, const char *what) {
  "   * YPP client is showing commodity listing screen\n"
  "   * YPP client window is on top (we try to raise it but your window\n"
  "      manager might have prevented that from succeeding)\n"
- "   * Your X display is 24bpp (NB some VNC servers use 16bpp by default)\n"
  "\n"
  "If all of these are true, please report this as a fault.\n\n"
          "Technical details:"
@@ -765,10 +764,15 @@ void find_islandname(RgbImage *ri) {
       
       for (p.y=islandnamer.tl.y; p.y<=islandnamer.br.y; p.y++) {
        pattern <<= 1;
-       switch (get_p(p)) {
-       case '*': if (runs[nruns]) { nruns++; runs[nruns]=0; }          break;
-       case 'O': runs[nruns]++;              pattern |= 1u;            break;
-       default:                              pattern |= 1UL<<31;       break;
+       double alpha= find_aa_density(ri,p, 0xCCCCAA,0x002255,0);
+       if (alpha >= 0.49) {
+          runs[nruns]++;
+          pattern |= 1u;
+       } else {
+         if (runs[nruns]) {
+           nruns++;
+           runs[nruns]=0;
+         }
        }
       }