rmagick-temp / rmagick

An interface to the ImageMagick and GraphicsMagick image processing libraries.
http://rmagick.rubyforge.org/
MIT License
790 stars 102 forks source link

Annotating fails when '@' is first character #59

Open VxJasonxV opened 12 years ago

VxJasonxV commented 12 years ago

I had a script in use for years that would record data from Last.fm, and build an image out of various song information.

Some time ago, on the order of months, this script would keep showing the current song being played, but would simply stop working when showing historical playback data.

After poking around, it appears that this was due to a leading @ character when using the annotate method. The rest of the data following the at-symbol does not appear to have any affect.

When invoked, Ruby would return this information:

bin/lastfmsig.rb:14:in `annotate': no text (ArgumentError)
        from bin/lastfmsig.rb:14:in `text'
        from bin/lastfmsig.rb:42
        from bin/lastfmsig.rb:37:in `each'
        from bin/lastfmsig.rb:37

shell returned 1

Changing the first three characters to be " @ " (space-at-space, really any character leading besides @) appears to have fixed this issue.

VxJasonxV commented 12 years ago

This is running on a 64-bit Gentoo Virtual Server.

RMagick is version 2.13.1 ImageMagick is version 6.7.8