lib/simple_captcha/image.rb in simple_captcha2-0.3.4 vs lib/simple_captcha/image.rb in simple_captcha2-0.4.0
- old
+ new
@@ -73,10 +73,12 @@
params << "-wave #{amplitude}x#{frequency}"
params << "-gravity Center"
params << "-pointsize 22"
params << "-implode #{ImageHelpers.implode}"
params << "label:#{text}"
- params << "-evaluate Uniform-noise #{SimpleCaptcha.noise}"
+ if SimpleCaptcha.noise and SimpleCaptcha.noise > 0
+ params << "-evaluate Uniform-noise #{SimpleCaptcha.noise}"
+ end
params << "jpeg:-"
SimpleCaptcha::Utils::run("convert", params.join(' '))
end
end