Page 1 of 1
Get color of a Pixel in a Bitmap with ruby
Posted: Wed Oct 02, 2013 3:28 pm
by chackl
Hello!
Is ist possible to get the color of a Pixel in a Bitmap with ruby - I know there is a primitive - but it is so slow :/
Best Regards,
C.Hackl
Re: Get color of a Pixel in a Bitmap with ruby
Posted: Wed Oct 02, 2013 8:10 pm
by trogluddite
AFAIK, there's no way to access any of the data inside the bitmap. My guess is that Ruby is just using a pointer to the bitmap memory that gets passed straight to GDI+, just reading the header to get the size information - that would also explain why the Ruby bitmap data can't be saved between sessions, as the memory location would be different every time.
Re: Get color of a Pixel in a Bitmap with ruby
Posted: Wed Oct 02, 2013 8:43 pm
by chackl
So i guess here is a big workaround needed.
I experimented today with some basic fst primitives. I hope i will get a working solution.
Regards