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
Getting pixel color from bitmap with Ruby
9 posts
• Page 1 of 1
Getting pixel color from bitmap with Ruby
Hey Guys, I am wondering is there some hidden function that can get the color values of a pixel in a bitmap at a specific coordinate? There is the GetPixel primitive which can be used, but I hoped to use ruby for it. I was thinking something like @bitmap.getARGB(12,23) but that ofcourse didnt work ![Crying or Very Sad :cry:](./images/smilies/icon_cry.gif)
![Crying or Very Sad :cry:](./images/smilies/icon_cry.gif)
- adamszabo
- Posts: 659
- Joined: Sun Jul 11, 2010 7:21 am
Re: Getting pixel color from bitmap with Ruby
See this (my) post: http://www.dsprobotics.com/support/viewtopic.php?f=2&t=14697
Still no real way that I have found, but I am no RUBY expert, that's for sure
Trog has some REALLY good info in the post though!
Aron
Still no real way that I have found, but I am no RUBY expert, that's for sure
![Laughing :lol:](./images/smilies/icon_lol.gif)
Trog has some REALLY good info in the post though!
![Uber Geek :ugeek:](./images/smilies/icon_e_ugeek.gif)
Aron
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
Re: Getting pixel color from bitmap with Ruby
hello everyone,
To get the pixel color from a bitmap using Ruby, you can use the ChunkyPNG library's Color module. This module provides various methods to extract color information from a PNG image, including the from_rgba method that returns the red, green, blue, and alpha values of a pixel at a given coordinate.
To get the pixel color from a bitmap using Ruby, you can use the ChunkyPNG library's Color module. This module provides various methods to extract color information from a PNG image, including the from_rgba method that returns the red, green, blue, and alpha values of a pixel at a given coordinate.
- Alisha78
- Posts: 1
- Joined: Sat Apr 29, 2023 9:14 am
Re: Getting pixel color from bitmap with Ruby
Yay!
Bots using chatGPT to spam using years old posts... Gr8![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Bots using chatGPT to spam using years old posts... Gr8
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
My beginner synth at KVR: https://www.kvraudio.com/product/saguaro-one-by-saguaro-one
- R&R
- Posts: 449
- Joined: Fri Jul 15, 2022 2:28 pm
Re: Getting pixel color from bitmap with Ruby
R&R wrote:Yay!
Bots using chatGPT to spam using years old posts... Gr8
Oh dear!
![Embarrassed :oops:](./images/smilies/icon_redface.gif)
That one got past me, but I’ll leave it in place as an example. Thanks for pointing it out and if it happens again maybe you can let me know…
It was clever because it seemed to fit the topic and my knowledge of Ruby is very limited.
I’ll remove the link though.
-
Spogg - Posts: 3327
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Getting pixel color from bitmap with Ruby
Haha, a good way to gage if its a bot is to check the registration date and the first post date:
Joined: Sat Apr 29, 2023 10:14 am
1st Post: Sat Apr 29, 2023 10:15 am
Only after 1 minute they post...seems like 100% bot
Usually a real person checks around the topics and browses a little before posting
Joined: Sat Apr 29, 2023 10:14 am
1st Post: Sat Apr 29, 2023 10:15 am
Only after 1 minute they post...seems like 100% bot
![Laughing :lol:](./images/smilies/icon_lol.gif)
- adamszabo
- Posts: 659
- Joined: Sun Jul 11, 2010 7:21 am
Re: Getting pixel color from bitmap with Ruby
The web is infested
All the API's for AI chats isn't going to make this any better in the future![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
All the API's for AI chats isn't going to make this any better in the future
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
My beginner synth at KVR: https://www.kvraudio.com/product/saguaro-one-by-saguaro-one
- R&R
- Posts: 449
- Joined: Fri Jul 15, 2022 2:28 pm
Re: Getting pixel color from bitmap with Ruby
Good points. I may get caught again, but at least I’m wise to it now.
I think my best approach, if in doubt, would be to ask a question before I allow the post to appear. No sensible answer and it doesn’t get posted.
I think my best approach, if in doubt, would be to ask a question before I allow the post to appear. No sensible answer and it doesn’t get posted.
-
Spogg - Posts: 3327
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Getting pixel color from bitmap with Ruby
Shoot first ask questions later?
If I start posting any type of assembler code "that works", then you know my account has been stolen by Skynet
nuke it ![Laughing :lol:](./images/smilies/icon_lol.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
If I start posting any type of assembler code "that works", then you know my account has been stolen by Skynet
![Wink ;)](./images/smilies/icon_e_wink.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
My beginner synth at KVR: https://www.kvraudio.com/product/saguaro-one-by-saguaro-one
- R&R
- Posts: 449
- Joined: Fri Jul 15, 2022 2:28 pm
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: Majestic-12 [Bot] and 12 guests