SRL Archive - General

CountColor( Color, X1, Y1, X2, Y2); BUG!


JuKKa

2007-12-08 06:25:30

I seem to have a bug in the CountColor function.. it returns "0" all the time -.-

Janilabo

2007-12-08 06:54:29

Why do you report the bug here? There is a section for reporting bugs at Freddy1990.com.

mastaraymond

2007-12-08 07:10:36

This is the wrong section..
It has been reported also..

JuKKa

2007-12-08 07:32:45

well, I couldnt find any place to report it.. NOT even at freddys.. SO PLEASE gimmeh a link..

Markus

2007-12-08 11:15:03

At Freddy1990.com there is a scar bugs section. Let it happen that I posted this there a few weeks ago:
http://www.freddy1990.com/forums/index.php?topic=1608.0
Actually the bug is only with colors other then 0. 0 Just works fine.

R0b0t1

2007-12-08 13:50:10

It must be the way he searches for the color…


Does anyone know if SCAR's FindColor function uses GetPixel?

Wanted

2007-12-08 14:32:35

Simple fix

function CountColor(Color, X1, Y1, X2, Y2: LongInt): LongInt;
var
TPA: TPointArray;
begin
FindColorsTolerance(TPA, Color, X1, Y1, X2, Y2, 0);
Result := GetArrayLength(TPA);
end;

function CountColorTolerance(Color, X1, Y1, X2, Y2, Tolerance: LongInt): LongInt;
var
TPA: TPointArray;
begin
FindColorsTolerance(TPA, Color, X1, Y1, X2, Y2, Tolerance);
Result := GetArrayLength(TPA);
end;

Naum

2007-12-08 15:16:32

Thanks icefire been looking for this :)

mastaraymond

2007-12-08 17:09:54

From: R0b0t1
It must be the way he searches for the color…


Does anyone know if SCAR's FindColor function uses GetPixel?


Dude CMON.. You know scar isn't using GetPixel..
Freddy even made a tutorial about scanline's..

R0b0t1

2007-12-08 23:13:47

Lol. He had some source somewhere that used it :p

Boreas

2007-12-08 23:28:04

From: Markus

Actually the bug is only with colors other then 0. 0 Just works fine.


Same thing happened with FindColorSkipBox (before divi, when it was in a plugin for 2.03).