Closed jumkey closed 9 months ago
Hi Jumkey,
To avoid unnecessary allocation of memory each frame, this driver returns the same image with data updated.
The recommended use is to have a custom panel or similar, but if you want to use WebcamPanel, you can wrap our class into another decorator class that creates a copy of the image each time it's requested.
The
WebcamDevice#getImage
method is implemented inconsistently compared to the built-inWebcamDefaultDevice
, which returns a newBufferedImage
object. This inconsistency currently results in theWebcamPanel
not executingrepaintPanel()
.This line always evaluates to true. https://github.com/sarxos/webcam-capture/blob/fdfcaea80c8f50eeb8f7c24475ff85a3c1fdcb32/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamPanel.java#L603