- priority: 5 --> 1
- status: open --> open-accepted
when working with globesimage
and trying to place the camera output to a rect different than
rect(0,0,640,480)-
for example, lets say you want to put it on rect(192,144,832,624);
img = webcamxtra.globsImage()
(the stage).image.copypixels(img,
rect(192,144,832,624),rect(0,0,w,h))
well, that just won't work:
the camera output changes but other information like bounding
boxes stay in rect (0,0,640,480)
until this bug will be fixed the current solution is
to copy the camera output inside a cast member:
img = webcamxtra.globsImage()
new_member = new(#bitmap, member(1000) )
new_member.image = img.duplicate()
then draw everything on this cast member -
for example when drawing the bounding boxes:
new_member.image.draw(boxes[i],[#color:
rgb(255,0,0),#shapetype:#rect])
finally, near the end of the code- projecting the castmember
to the new location on stage:
(the stage).image.copypixels(new_member.image,
rect(192,144,832,624),new_member.rect)