comopasta Gr wrote in post #977118:
> Hi,
>
> Any ideas why I get "undefined method `size' for   100x100 DirectClass
> 8-bit:Magick::Image" while doing the next?
>
> image = Magick::Image.new(100, 100) { self.size = "100x100"}
> logger.info image.size
>
...
>
> This is how I use it normally to store to file system and goes fine.
>
> @qr = RQRCode::QRCode.new("Some text" :size => 6)
> FileUtils.mkdir_p "public/images/tags/#{ident}"
> @img = QRImage.new(@qr).sample(1)
> path = "public/images/tags/#{@tag.identifier}/#{ident}_thumb.png"
> @img.write(path)

Well, what you're trying to do in the top section would seem to indicate 
that there isn't a size attribute available, or the method chaining is 
getting scrambled.  And the second filesystem example doesn't really say 
anything about 'size' as you aren't interrogating the size attribute in 
that code.  All that aside...

Have you tried it in irb?  And perhaps

Magick::Image.new( size => '100x100' )

(totally untested, and theoretical)

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to