TLama

Untitled

Aug 12th, 2014
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.43 KB | None | 0 0
  1. uses
  2.   GDIPAPI, GDIPOBJ;
  3.  
  4. type
  5.   // we need to subclass the TGPImage to access the protected NativeImage field
  6.   TGPImage = class(GDIPOBJ.TGPImage)
  7.   public
  8.     function GetPixel(X, Y: Integer; out Color: TGPColor): TStatus;
  9.   end;
  10.  
  11. implementation
  12.  
  13. { TGPImage }
  14.  
  15. function TGPImage.GetPixel(X, Y: Integer; out Color: TGPColor): TStatus;
  16. begin
  17.   Result := SetStatus(GdipBitmapGetPixel(GPBITMAP(NativeImage), X, Y, Color));
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment