New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to add a label to an image? #150
Comments
looking here in the imagemagick docs: http://www.imagemagick.org/Usage/text/#label |
this is pretty straight forward once you understand how to translate the morgify options into block commands image.combine_options do |i|
i.font "Helvetica"
i.gravity "South"
i.pointsize 14
i.draw "text 0,0 'foo'"
end |
@jedschneider It can't support ZH-CN, have other suggestions? e.g: res_img = MiniMagick::Image.new("tmp/test_qrcode1.jpg")
res_img.combine_options do |i|
i.font "Helvetica"
i.pointsize 14
i.encoding "GB2312"
i.label:"我.utf8"
i.draw "text 110,180 'DHH我.utf8'"
end Thanks. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From reading the source I would think I would use the combine_options method to invoke the internal CommandBuilder class, but I'm getting a little lost in the metaprogramming there and I don't know imagemagick that well to have a feel for how it might look.
here's my attempt that doesn't seem to work.
maybe I overlooked an example in the readme that does something similar. if not, perhaps an addition would be handy, which i'd be happy to write once I know how it works. thanks.
The text was updated successfully, but these errors were encountered: