Janilabo 11 Posted May 22, 2012 Counts the amount of pixels in area (XS, YS, XE, YE). Example included. GetPixelCount [scar]function GetPixelCount(XS, YS, XE, YE: Integer): Integer; begin if (XS > XE) or (YS > YE) then Exit; Result := (((XE - XS) + 1) * ((YE - YS) + 1)); end; var W, H: Integer; begin SetDesktopAsClient; GetClientDimensions(W, H); WriteLn('Desktop screen contains ' + IntToStr(GetPixelCount(0, 0, (W - 1), (H - 1))) + ' pixels!'); end.[/scar] Quote Share this post Link to post Share on other sites
Bixby Sayz 4 Posted May 22, 2012 Holy crap someone has been busy. I swear your post count doubled in a single day. Quote Share this post Link to post Share on other sites