Parcourir la source

* 81% success

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@457 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam il y a 20 ans
Parent
révision
f71e89f830
1 fichiers modifiés avec 8 ajouts et 5 suppressions
  1. +8
    -5
      src/paypal.c

+ 8
- 5
src/paypal.c Voir le fichier

@@ -88,12 +88,12 @@ static void find_glyphs(struct image *img)
getgray(fonts[f]->img, xmin + z, ymin + t, &r);
getgray(img, x + z, y + t, &r2);
if(r < r2)
dist += abs(r - r2);
dist += (r - r2) * (r - r2);
else
dist += abs(r - r2) * 3 / 4;
dist += (r - r2) * (r - r2) / 2;
}
//dist = dist * 128 / fonts[f]->glyphs[i].count;
dist = dist * 1024 / (xmax - xmin - 2 * DELTA);
dist = dist / (xmax - xmin - 2 * DELTA) / (xmax - xmin - 2 * DELTA);
if(dist < localmin)
{
localmin = dist;
@@ -123,12 +123,15 @@ static void find_glyphs(struct image *img)
{
getpixel(fonts[bestfont]->img, xmin + x, ymin + y, &r, &g, &b);
if(r > 128)
continue;
{
getpixel(img, bestx + x, besty + y, &r, &g, &b);
r = 255;
}
setpixel(img, bestx + x, besty + y, r, g, b);
}
#endif

startx = bestx + xmax - xmin;
startx = bestx + fonts[bestfont]->glyphs[bestch].xmax - fonts[bestfont]->glyphs[bestch].xmin;
result[cur++] = fonts[bestfont]->glyphs[bestch].c;
}
}


Chargement…
Annuler
Enregistrer