Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Get color of a Pixel in a Bitmap with ruby

For general discussion related FlowStone

Get color of a Pixel in a Bitmap with ruby

Postby chackl » Wed Oct 02, 2013 3:28 pm

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
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
User avatar
chackl
 
Posts: 233
Joined: Tue Aug 17, 2010 8:46 pm
Location: Austria / Salzburg

Re: Get color of a Pixel in a Bitmap with ruby

Postby trogluddite » Wed Oct 02, 2013 8:10 pm

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.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Get color of a Pixel in a Bitmap with ruby

Postby chackl » Wed Oct 02, 2013 8:43 pm

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
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
User avatar
chackl
 
Posts: 233
Joined: Tue Aug 17, 2010 8:46 pm
Location: Austria / Salzburg


Return to General

Who is online

Users browsing this forum: Google [Bot] and 153 guests