I have a problem with following: My canvas element (1280x720) needs to get mirrored horizontally and rotated to 180 degrees. After that, the canvas becomes an base64 image (works without problems).
I tried:
var ctx =meinElement.getContext('2d');
meinElement.width = 1280;
meinElement.height = 720;
ctx.scale(-1, 1);
ctx.translate(meinElement.width-1, meinElement.height-1);
ctx.rotate(Math.PI);
ctx.drawImage(video, 0, 0, meinElement.width, meinElement.height);
The rotation works like a charm, but the mirroring causes an black element - no matter if I rotate or mirror first - does someone have an idea?
Thanks a lot!