probablycorey/mini_magick — Issue #80: label in MOGRIFY_COMMANDS & IMAGE_CREATION_OPERATORS
Author: robertjwhitney
Created: 2012-03-06 22:06:57+00:00
State: open

'label' has different behaviors for the different syntaxes. The first is to add the label as meta-data, the second draws an actual label on the image. I don't think there is a way to specify to use -label arg or label:arg so it never gets passed elsif MOGRIFY_COMMANDS.include?

```ruby
def method_missing(symbol, *options)
guessed_command_name = symbol.to_s.gsub('_','-')
if guessed_command_name == "format"
raise Error, "You must call 'format' on the image object directly!"
elsif MOGRIFY_COMMANDS.include?(guessed_command_name)
add_command(guessed_command_name, *options)
self
elsif IMAGE_CREATION_OPERATORS.include?(guessed_command_name)
add_creation_operator(guessed_command_name, *options)
self
else
super(symbol, *args)
end
end
```

- label arg
http://www.imagemagick.org/script/command-line-options.php#label

label:arg
http://www.imagemagick.org/Usage/text/#label

As far as I can tell, label:arg is the best way to add text that dynamically resizes to dimensions given by -size