Marius Stroe
2008-Jun-26 09:50 UTC
[fxruby-users] How to make a copy of an existing image instance
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 : c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.14-mswin32/lib/fox16/aliases.rb:1118:in `getWidth'': This FXDrawable * already released (RuntimeError) Here is some code: dataBuffer = File.open("someFile.jpg","rb").read img = FXJPGImage.new(getApp(), dataBuffer, IMAGE_OWNED|IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP) 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>