Hello list, Has anyone done any work combining WxRuby and RMagick? In Python, it is possible to convert a PythonMagick image to a Wx::Image and display it. However, unsurprisingly, the APIs are different in Ruby. Google didn''t turn up anything. Has anyone on the list worked with WxRuby and RMagick? Thanks, Jacob
Jacob Hanson wrote:> Hello list,Hello!> Has anyone done any work combining WxRuby and RMagick?Not that I am aware of.> In Python, > it is possible to convert a PythonMagick image to a Wx::Image and > display it.Sounds cool. After we shift to generating wxRuby via SWIG, it should be easier to integrate add-ons, like this one. Kevin
Monday, June 7, 2004, 11:21:52 PM, you wrote:>> In Python, >> it is possible to convert a PythonMagick image to a Wx::Image and >> display it.> Sounds cool. After we shift to generating wxRuby via SWIG, it should be > easier to integrate add-ons, like this one. > KevinHello Kevin, After several hours spent hunting and tinkering, I finally hacked together a working sample! In fact, I got all ambitious and added a code samples page to the wiki....and then found that this wiki doesn''t handle code well. *doh* http://wxruby.rubyforge.org/wiki/wiki.pl?RMagickCode1 I guess someone will need to clean it up (sorry). I hate to see the new samples page go because I think it could be a good resource, but this particular wiki isn''t up to the task. Jacob -- _/ _/ _/ Jacob Hanson _/ _/_/_/ mailto:jacdx@jacobhanson.com _/_/_/ _/ _/ http://www.jacobhanson.com
Jacob Hanson wrote:> > Monday, June 7, 2004, 11:21:52 PM, you wrote: > >> In Python, > >> it is possible to convert a PythonMagick image to a Wx::Image and > >> display it. > > > Sounds cool. After we shift to generating wxRuby via SWIG, it should be > > easier to integrate add-ons, like this one. > > Kevin > > Hello Kevin, > > After several hours spent hunting and tinkering, I finally hacked > together a working sample! In fact, I got all ambitious and added a > code samples page to the wiki....and then found that this wiki doesn''t > handle code well. *doh* > > http://wxruby.rubyforge.org/wiki/wiki.pl?RMagickCode1 > > I guess someone will need to clean it up (sorry). I hate to see the new > samples page go because I think it could be a good resource, but this > particular wiki isn''t up to the task.Thanks for adding this! The problem you encountered is that an empty line in the wiki signals and end of the code block. Simply adding something like a single tab to these empty lines will correct the problem. (I went to fix it, but someone else beet me to it -- thanks, Robert). Curt
Jacob Hanson wrote:> After several hours spent hunting and tinkering, I finally hacked > together a working sample!Very cool! I haven''t studied the code yet, but it is working at a level that I hadn''t even thought might be possible. Thanks, Kevin
Hi> After several hours spent hunting and tinkering, I finally hacked > together a working sample!Nice one, look forward to trying it. I''m looking to include an image viewer within an app I''m writing. It doesn''t need to be able to edit the images, just zoom in and out, and select areas of the image with the mouse. Any suggestions from people for how to do the resizing - is this something I need an external lib like *Magick for, or is there something simpler I can use? thanks alex
alex fenton wrote:> Any suggestions from people for how to do the resizing - is this > something I need an external lib like *Magick for, or is there something > simpler I can use?Wx::Image has a scale method, as well as rotate. I haven''t tried them myself. Kevin