Article View: comp.lang.basic.misc
Article #172Re: Picture and colour?
From: James Parsly
Date: Mon, 02 Aug 1999 00:00
Date: Mon, 02 Aug 1999 00:00
40 lines
1787 bytes
1787 bytes
On Mon, 2 Aug 1999 19:59:44 +0200, "Pierre Fenkart" <Falke2@gmx.de> wrote: >Hi! > >I know, how i can calculate the position of the mouse in x and y >coordinates, but I don't know, how i can get information wether the colour >is blue, red or green about the picture on this x and y coordinates. > >Also I don't know, how I can make around the Mouse a circle, and calculate >all the pixels (in the picture) wether the colour is blue, red or green (how >many pixels are in the circle) > >Does anybody know something how i can interrogate this? > >Thanks in advanced > >Pierre > > > > POINT(X,Y) will give you the RGB value at the point. As for the other, this should work: ' ' look at all pixels in the square containing the circle ' for xx = x - r to x + r for yy = y - r to y + r ' ' only use pixels that are in the circle ' if sqr((xx-x)^2 + (yy-y)^2) <= r '...do something with point(xx,yy) '...and count the number of pixels end if next yy next xx
Technical Details
Message-ID:
<37a5e39f.20762722@netnews.tva.gov>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7o4m9q$cmg$1@pollux.ip-plus.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f645d,558249d4814d0e5f X-Google-Attributes: gidf645d,public X-Google-Thread: 112458,558249d4814d0e5f X-Google-Attributes: gid112458,public X-Google-Thread: 10c949,558249d4814d0e5f X-Google-Attributes: gid10c949,public X-Google-Thread: 110e3b,558249d4814d0e5f X-Google-Attributes: gid110e3b,public X-Google-Thread: fb992,558249d4814d0e5f X-Google-Attributes: gidfb992,public From: japarsly@tva.gov (James Parsly) Subject: Re: Picture and colour? Date: 1999/08/02 Message-ID: <37a5e39f.20762722@netnews.tva.gov> X-Deja-AN: 508056335 References: <7o4m9q$cmg$1@pollux.ip-plus.net> Organization: TVA Newsgroups: comp.lang.basic.misc,comp.lang.basic.visual,comp.lang.basic.visual.misc,comp.lang.visual.basic,fido.ger.basic