#cs----------------------------------------------------------------
;	Autor:		jenning@usa.com
;	Funktion:	PixelColorSum(left, top, right, bottom, color_dec)
;
;	Aufgabe:	ähnlich PixelCheckSum()
;	Detail:		zählt die pixel nur einer bestimmten Farbe 
;				in dem angegebenem Bereich und gibt die Summe aus
;	Bsp1: 	0 ist 3444443 
;	Bsp2:	. ist 0000022
; 	Bsp3:	8 ist 3443443
#ce----------------------------------------------------------------
Func PixelColorSum($x, $y, $x2, $y2, $color_dec)
	local $count = 0
	$count = ""
	local $counter[660]
	local $i=0, $k=0, $j=0
	
	For $j = $y To $y2 Step +1
		For $i = $x To $x2 Step +1
			IF PixelGetColor($i, $j) = $color_dec Then
				$counter[$j] = $counter[$j] + 1
			EndIf
		Next
	Next
	;erstelle $count
	For $k =$y To $y2 Step +1
		$count = $count&$counter[$k]
	Next	
	;gib einen Wert heraus
	Return $count
EndFunc	