On canvas2D, context.drawImage fails when source video is of unusual geometry
Reported by
cpaulin@chromium.org,
Apr 21 2016
|
|||||
Issue descriptionVersion: ToT chrome linux My setup is like this: 1) draw a 17x17 canvas in solid color 2) capture this canvas using canvas.CaptureStream() 3) play the captured stream in a video tag 4) snapshot that video tag in a new canvas (snapshotCanvas) My observation is that on step 4, the snapshotCanvas does not get drawn correctly if the geometry of video is unusual (like 5x5 or 17x17) I have attached a simple javascript that tries these steps above, using clearRect() to clear canvas prior to drawing in one case and in the other case using context.save()/restore() to clear canvas before a second drawImqae() call. See attached zoomed screen capture.
,
Apr 22 2016
The problem is that the snapshotCanvas (3rd one on the right) is not drawn identically to the other two on the left, it is missing some bottom rows of pixels.
,
Apr 25 2016
,
Apr 25 2016
junov@, I think this issue is more than the scope of canvas capture. Canvas capture produces the output as a MediaStream and it is played in a <video> tag. In the example you can see that playing that MediaStream in a <video> tag that is 17x17 is fine -square in the middle-. That indicates canvas capture is producing the correct output. The problem arises when that 17x17 video is drawn on a 17x17 canvas via drawImage(video, 0, 0) -square on the right-. At that point, the bottom right corner seems to be cut, indicating a padding problems. AFAIU, you can cut the canvas capture part and reproduce the problem with just playing a 17x17 video. WDYT?
,
Apr 27 2016
Alright, I will look into this a bit more.
,
May 2 2016
I can no longer see the problem on today's linux ToT
,
May 20 2016
cool, mark as fixed.
,
May 20 2016
Actually, when a bug does not repro, we mark it as WontFix. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by cpaulin@chromium.org
, Apr 22 2016506 KB
506 KB Download