https://bugzilla.gnome.org/show_bug.cgi?id=685548
  LDTP | ldtp2 | head

           Summary: imagecapture x,y offset, height and width parameters
                    are disregarded if window parameter is provided
    Classification: Other
           Product: LDTP
           Version: head
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ldtp2
        AssignedTo: ldtp-ma...@gnome.bugs
        ReportedBy: marek.j.r...@gmail.com
         QAContact: ldtp-dev@lists.freedesktop.org
     GNOME version: ---


image capture offset, width and height parameters are only used when whole
desktop image capture is taken.

imagecapture(windowName, outputFile, offsetX, offsetY, captureWidth,
captureHeight)

When the windowName parameter is provided then whole window capture is taken
regardless of what the offsets, width and height parameters are.

When the windowName parameter is omitted then the offsets, width and height
parameters are respected

It works fine when following line in ldtpd/generic.py (line 85) is changed
from:

x, y, height, width = bb.x, bb.y, bb.height, bb.width

to something like this:

x, y = x + bb.x, y + bb.y
if height > bb.height:
    height = bb.height
if width > bb.width:
    width = bb.width

Thanks.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are watching the assignee of the bug.
_______________________________________________
LDTP-dev mailing list
LDTP-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev

Reply via email to