[wxruby-users] StaticBitmap
Mario Steele
mario at ruby-im.net
Sun Nov 16 00:01:38 EST 2008
You will need to convert the data over from Rmagick format to wxRuby
format. You have the basic idea, in which you need to retrieve the RGB
Pixel data from the RMagick object, and then apply that to a wxRuby Image
object. However, you will also need to grab the Palette from RMagick, to
apply to the wxRuby Image Object, through Wx::Image#set_palette().
I believe this is the method in which you need to go about this, however,
I've never worked with Rmagick, and wxRuby personally. But you definately
need to go through Image#set_data() and Image#set_palette to make it work.
I think Alex may have a bit more experience with this, so he may be able to
give you a clearer answer to this question.
On Sat, Nov 15, 2008 at 8:47 PM, Cyrill Jakovlev <lists at ruby-forum.com>wrote:
> How can I take image from Rmagick object?
> I try image.set_data(blob), but this wrong..
> Is possible make scrollable StaticBitmap?
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20081115/851a6fc0/attachment.html>
More information about the wxruby-users
mailing list