Changeset 457
 Timestamp:
 Jan 12, 2005, 5:33:03 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

pwntcha/trunk/src/paypal.c
r456 r457 89 89 getgray(img, x + z, y + t, &r2); 90 90 if(r < r2) 91 dist += abs(r  r2);91 dist += (r  r2) * (r  r2); 92 92 else 93 dist += abs(r  r2) * 3 / 4;93 dist += (r  r2) * (r  r2) / 2; 94 94 } 95 95 //dist = dist * 128 / fonts[f]>glyphs[i].count; 96 dist = dist * 1024/ (xmax  xmin  2 * DELTA);96 dist = dist / (xmax  xmin  2 * DELTA) / (xmax  xmin  2 * DELTA); 97 97 if(dist < localmin) 98 98 { … … 124 124 getpixel(fonts[bestfont]>img, xmin + x, ymin + y, &r, &g, &b); 125 125 if(r > 128) 126 continue; 126 { 127 getpixel(img, bestx + x, besty + y, &r, &g, &b); 128 r = 255; 129 } 127 130 setpixel(img, bestx + x, besty + y, r, g, b); 128 131 } 129 132 #endif 130 133 131 startx = bestx + xmax xmin;134 startx = bestx + fonts[bestfont]>glyphs[bestch].xmax  fonts[bestfont]>glyphs[bestch].xmin; 132 135 result[cur++] = fonts[bestfont]>glyphs[bestch].c; 133 136 }
Note: See TracChangeset
for help on using the changeset viewer.