Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Arbrakan
15
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 10th Oct 2010 19:05
Hello all !,

I want to know if it his possible with DB, to get the color from a pixel in a image.

I want scan all pixel from a image and get back de color from each pixel..

thx.

(And sorryfor my bad english...)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Oct 2010 22:35 Edited at: 10th Oct 2010 22:36
The command you are looking for is point(). This is very slow however, so it would be much wiser to use memblocks to solve this problem:



To get the individual red, green and blue colors, use this:



The code above is untested, but I think it should work

TheComet

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 10th Oct 2010 22:35 Edited at: 10th Oct 2010 22:36
Yes there are to options
A. Paste the image and use the Point(x,y) to store the value in an array. (It's very slow though)

B. Use memblocks and read the colors of each pixel into an array.

[Edit] TheComet just beat me to it.

My computer surpasses all the technologies of the day. What computer do I have?

Login to post a reply

Server time is: 2026-07-22 03:51:58
Your offset time is: 2026-07-22 03:51:58