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 Thanks. ------------- This is what I''m trying to do: I''m using the qr_image.rb to create QR codes for my app. qr_image.rb is explained here: http://bit.ly/hCFrs1 I''m now trying to store the generated images into Amazon S3. The upload process complains that the image has no size method. I''ve been trying different ways to feed the image size during the creation with no success. This is how I use it: @qr = RQRCode::QRCode.new("Some text", :size => 6) @img = QRImage.new(@qr).sample(10) logger.info @img.size return a noMethod error and breaks the next part AWS::S3::S3Object.store( "#{id}.png", @img, aBucketinS3 ) 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) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No help with RMagick? Maybe someone has some good alternative to RMagick. Cheers. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 24 January 2011 17:12, comopasta Gr <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> No help with RMagick? > Maybe someone has some good alternative to RMagick.Please remember to quote the previous message so that the thread makes sense. I think you are rather optimistic hoping for a reply to your original post within three hours. At any one time one third of the world is asleep, one third is working and most of the rest are not interested in RoR. Unfortunately that leaves you and me at the moment and I don''t know about RMagik. Sorry. If you are patient someone may come along who can help. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote in post #977193:> On 24 January 2011 17:12, comopasta Gr <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> No help with RMagick? >> Maybe someone has some good alternative to RMagick. > > Please remember to quote the previous message so that the thread makes > sense. > > I think you are rather optimistic hoping for a reply to your original > post within three hours. At any one time one third of the world is > asleep, one third is working and most of the rest are not interested > in RoR. Unfortunately that leaves you and me at the moment and I > don''t know about RMagik. Sorry. If you are patient someone may come > along who can help. > > ColinHi Colin. You are absolutely right. I shall wait :-) Thanks for the heads up. Good to know you are around.> and most of the rest are not interested in RoRWe should do something about that also. Cheers. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.