Tallefer / kaptcha

Automatically exported from code.google.com/p/kaptcha
Other
0 stars 0 forks source link

patch - replace imaging jar with pixels jar #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attached is a patch that replaces imaging jar with pixels jar (
pixels-core-2.1.2-SNAPSHOT from
https://pixels.dev.java.net/servlets/ProjectDocumentList).

I had to tweak some of the filter settings to make the output similar to
the original ones w/ imaging.

One thing to note is that WaterFilter in pixels jar really produces water
effect in WaterRipple class, while it wasn't visible at all with the
original code from SimpleCaptcha. I set WaterFilter wavelength to 2 to make
sure the texts are still easily readable, specially with lowercase
characters. Anything greater than 2 no longer produce readable characters.

Since default Kaptcha configuration uses WaterRipple as the default
obscufirator implementation, the new WaterFilter in pixels cause an extra
water effect on the default generated captcha.

If you want to keep the default captcha consistent to the original one w/
imaging jar, I suggest to remove the use of WaterFilter in WaterRipple
class, simply rename the class to RippleGimpy and make it the default
obscufirator in Config. I can submit another patch to reflect this changes
if you prefer it, let me know.

-- the tabs are preserved in the patch, there are some lines in xml files
which might look identical, but they are actualy trailing-whitespaces-trimmed

Original issue reported on code.google.com by cliffano on 16 May 2008 at 2:18

Attachments:

GoogleCodeExporter commented 9 years ago
applied the patch. i'm fine with the current output. it seems a bit fuzzy on 
the edges, but its fine and that 
probably makes it harder to defeat.

Original comment by latch...@gmail.com on 11 Jun 2008 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by latch...@gmail.com on 11 Jun 2008 at 4:09