capture(region) gives (partly) black images

Bug #577610 reported by Matthew Simons
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
Unassigned

Bug Description

All of my temporary screen captures in the c:\...\temp folder are black rectangles. Every capture that is manually done is saved correctly in the project folder, but find() functions performed on dynamic capture() calls all fail because the temp captures are all just blank, black screens.

I've been using "print capture([region])" to get file names and when I check them, they turn up as black rectangles unless the region contains all or most of the region containing the sikuli IDE. If the region contains less than about half of the sikuli IDE, it is a black rectangle. If it contains only a portion of the sikuli IDE, then it is partially black and sometimes partially populated with a screenspace other than the intended region. if the region contains the entire sikuli IDE the screenshot is captured correctly and contains no areas of blackness.

Setup info:
-most recent sikuli release (downloaded a few days ago)
-Win 7 ultimate 64-bit.
-Sikuli has full permissions and is being run in admin mode.
-tried running in compatibility for XP and Vista (most recent service packs).
-using an nVidia 8600GTS and have the most recent drivers.
-resolution is set to 1680x1050.

The issue here seems to be similar to what was reported in https://answers.launchpad.net/sikuli/+question/105160

Tags: 0.10 capture
Revision history for this message
Matthew Simons (thatsimonsguy) wrote :
Revision history for this message
RaiMan (raimund-hocke) wrote :

Mac 10.6 also
capture(selectRegion()) gives a black picture in temp file.

tags: added: 0.10 capture
RaiMan (raimund-hocke)
summary: - capture() still saving black screens
+ capture(region) gives (partly) black images
Revision history for this message
RaiMan (raimund-hocke) wrote :

my tests gave:
- capture(x,y,w,h) always works with any w and h if both x and y are 0

the buggy capture is only with x and/or y > 0.

if both x and y are greater than w and h the captured image is totally black.

if x and/or y are < w/h respectively, you will have the upper left part of the image in the lower right part of the captured image.

if you add the x and y value to w and h respectively, you will get a capture with
- width = x+w and height = y+h
- the wanted image in the lower right corner with the relative position x,y
- and the rest being black.

example:
capture wanted: capture(200, 100, 200, 100)
you say capture(200, 100, 400, 200)

If you now could say capture on the captured image, capture(200, 100, 200, 100) would give you the wanted image.

Revision history for this message
RaiMan (raimund-hocke) wrote :

Since I related a question on partly black captures in multi monitor environments, I tested with the following monitor configuration with Mac 10.6:
primary: 1920x1200, secondary on the left at (-1280,0) with 1280x960

captures on primary:
there is an additional x-offset (to the above mentioned ones with single monitor) with the width of the secondary monitor.

captures on secondary:
same effect as for a single monitor situation, with the single (0,0) being in this case (-1280,0).

so the above example would read:
capture wanted: capture(-1080, 100, 200, 100)
you say capture(-1080, 100, 400, 200)
and at least you can see your wanted image in the lower right part of the captured image.

Changed in sikuli:
status: New → In Progress
Changed in sikuli:
status: In Progress → Fix Committed
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.