A-man Posted August 9, 2012 Share Posted August 9, 2012 I know I asked almost this exact question a couple weeks ago, but this time it is regarding the new API. The fastsetpixel and fastgetpixel functions don't show up in the intellisense, and I'm not sure what the 'const bmp' is. I looked in the wiki, but it wasn't there yet. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted August 9, 2012 Share Posted August 9, 2012 Heres an example of using the canvas of the bitmap to set / get the color of the pixels really easy [scar] var BMP: TSCARBitmap; begin BMP := GetClient.CaptureEx(0,0,50,50); Writeln(BMP.Canvas.Pixels[10, 10]); // Same as Fast get pixel BMP.Canvas.Pixels[10, 10] := clRed; // Same as Fast set pixel BMP.Free; end. [/scar] Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 9, 2012 Share Posted August 9, 2012 (edited) Heres an example of using the canvas of the bitmap to set / get the color of the pixels really easy [scar] var BMP: TSCARBitmap; begin BMP := GetClient.CaptureEx(0,0,50,50); Writeln(BMP.Canvas.Pixels[10, 10]); // Same as Fast get pixel BMP.Canvas.Pixels[10, 10] := clRed; // Same as Fast set pixel BMP.Free; end. [/scar] Why use the canvas? [scar] var BMP: TSCARBitmap; begin BMP := GetClient.CaptureEx(0,0,50,50); try Writeln(BMP.Pixels[10, 10]); // Same as Fast get pixel BMP.Pixels[10, 10] := clRed; // Same as Fast set pixel finally BMP.Free; end; end. [/scar] The canvas is A LOT slower, the Pixels property of TSCARBitmap is the actual replacement of the FastPixel API... Edited August 9, 2012 by Freddy Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted August 9, 2012 Share Posted August 9, 2012 Why use the canvas? [scar] var BMP: TSCARBitmap; begin BMP := GetClient.CaptureEx(0,0,50,50); try Writeln(BMP.Pixels[10, 10]); // Same as Fast get pixel BMP.Pixels[10, 10] := clRed; // Same as Fast set pixel finally BMP.Free; end; end. [/scar] The canvas is A LOT slower, the Pixels property of TSCARBitmap is the actual replacement of the FastPixel API... Didnt see the pixels property of the bitmap. Same principle tho. Quote Link to comment Share on other sites More sharing options...