[fxruby-users] How to make a copy of an existing image instance

Marius Stroe stroemarius84 at yahoo.com
Thu Jun 26 05:50:35 EDT 2008

Maybe someone know the answer. How to make an exact copy of a previously instanced FXImage object?

I need that because image manipulation like crop or scale methods
affect the current object. I have tried to use clone or dup method to
create an exact copy of image but when I tried to use cloned object I
recieve :

`getWidth': This FXDrawable * already released (RuntimeError)

Here is some code:

dataBuffer = File.open("someFile.jpg","rb").read


clonedImage = img.clone

puts clonedImage.width

I need some idea to make multiple copies of a current image. Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080626/0056a45f/attachment.html>

More information about the fxruby-users mailing list