Jump to content

DiamondeX

Members
  • Posts

    1
  • Joined

  • Last visited

DiamondeX's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello! I'm trying to use this library to create 60x60px window to show 6x zoomed 10x10px area under the mouse pointer to make precised snapshots. After FFSnapshot I'm using FFGetPixel, but it returns color 0x00737373 or 0xffffffff, though when i'm using FFSaveBMP i'm getting what expected - colorful picture. Here is code fragment: $pos = MouseGetPos() FFSnapShot($pos[0]-5, $pos[1]-5, $pos[0]+4, $pos[1]+4, 0) If Not $emcTempFileTaken Then $emcTempFileTaken = True FFSaveBMP ( "temp" ) EndIf Local $c For $x = 0 To 9 For $y = 0 To 9 $c = FFGetPixel($x,$y, 0) DbgLog($locn&'.(x,y)=('&$x&','&$y&') c='&Hex($c)) Next Next What is wrong with FFGetPixel? ................................................. Well, I found the reason: FFGetPixel needs coordinates relative to source of the corresponding snapshot, but not snapshot itself, i.e. if you take FFSnapShot(10, 10, 50, 50) then you should use FFGetPixel(10,10) to get color of snapshot's left-top corner pixel, but not FFGetPixel(0,0)! I spend valuable time to understand this by experinence, so I think this particular case and related ones must be explained in documentation.
×
×
  • Create New...