Module: TianjiQRCodePNG::QRCodeExtensions
- Defined in:
- lib/tianji_qrcode_png/qrcode_extensions.rb
Instance Method Summary collapse
-
#to_img(bg_color = ChunkyPNG::Color::TRANSPARENT, color = ChunkyPNG::Color::BLACK, border = 1) ⇒ Object
to_img方法,加入二维码颜色和边框参数.
Instance Method Details
#to_img(bg_color = ChunkyPNG::Color::TRANSPARENT, color = ChunkyPNG::Color::BLACK, border = 1) ⇒ Object
to_img方法,加入二维码颜色和边框参数
4 5 6 |
# File 'lib/tianji_qrcode_png/qrcode_extensions.rb', line 4 def to_img(bg_color = ChunkyPNG::Color::TRANSPARENT, color = ChunkyPNG::Color::BLACK, border = 1) return Image.new(self).render(bg_color, color, border) end |