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

Getting pixel color from bitmap with Ruby

For general discussion related FlowStone

Getting pixel color from bitmap with Ruby

Postby adamszabo » Fri May 14, 2021 5:04 pm

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 :cry:
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Getting pixel color from bitmap with Ruby

Postby aronb » Fri May 14, 2021 5:39 pm

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 :lol:

Trog has some REALLY good info in the post though! :ugeek:


Aron
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: Getting pixel color from bitmap with Ruby

Postby Alisha78 » Sat Apr 29, 2023 9:15 am

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.
Alisha78
 
Posts: 1
Joined: Sat Apr 29, 2023 9:14 am

Re: Getting pixel color from bitmap with Ruby

Postby R&R » Sun Apr 30, 2023 1:08 pm

Yay!
Bots using chatGPT to spam using years old posts... Gr8 :roll:
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: Getting pixel color from bitmap with Ruby

Postby Spogg » Mon May 01, 2023 8:34 am

R&R wrote:Yay!
Bots using chatGPT to spam using years old posts... Gr8 :roll:

Oh dear! :oops:

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.
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Getting pixel color from bitmap with Ruby

Postby adamszabo » Mon May 01, 2023 9:49 am

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 :lol: Usually a real person checks around the topics and browses a little before posting
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Getting pixel color from bitmap with Ruby

Postby R&R » Mon May 01, 2023 10:32 am

The web is infested :lol:
All the API's for AI chats isn't going to make this any better in the future :roll:
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm

Re: Getting pixel color from bitmap with Ruby

Postby Spogg » Mon May 01, 2023 11:14 am

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.
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Getting pixel color from bitmap with Ruby

Postby R&R » Mon May 01, 2023 1:53 pm

Shoot first ask questions later? ;) :mrgreen:

If I start posting any type of assembler code "that works", then you know my account has been stolen by Skynet ;) nuke it :lol:
R&R
 
Posts: 468
Joined: Fri Jul 15, 2022 2:28 pm


Return to General

Who is online

Users browsing this forum: No registered users and 87 guests