WebKit Bugzilla
Attachment 357546 Details for
Bug 192807
: An unexpected 1px line appears when using context.drawImage() method to show a specified part of a JPEG file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
a html file used for this test.
index.html (text/html), 1.04 KB, created by
nishiyama.satomi
on 2018-12-18 00:13:15 PST
(
hide
)
Description:
a html file used for this test.
Filename:
MIME Type:
Creator:
nishiyama.satomi
Created:
2018-12-18 00:13:15 PST
Size:
1.04 KB
patch
obsolete
><!doctype html> ><html> > <head> > <meta charset="utf-8"> > <style> > canvas { > border: 1px solid #000; > } > </style> > </head> > <body> > <p>test.jpg</p> > <canvas id="canvas0" width="256" height="517"></canvas> > > <p>test.png</p> > <canvas id="canvas1" width="256" height="517"></canvas> > > <p>test.jp2</p> > <canvas id="canvas2" width="256" height="517"></canvas> > > <p>test.gif</p> > <canvas id="canvas3" width="256" height="517"></canvas> > > <script> > [ > 'test.jpg', > 'test.png', > 'test.jp2', > 'test.gif' > ].forEach(function(imgName, index) { > var canvas = document.getElementById('canvas' + index); > var img = new Image(); > img.onload = function() { > var ctx = canvas.getContext('2d'); > var h = 127; > var y = 517 - h; > > ctx.drawImage( > img, > 0, y, > 256, h, > 0, y, > 256, h > ); > }; > > img.src = imgName; > }); > </script> > </body> ></html>
<!doctype html> <html> <head> <meta charset="utf-8"> <style> canvas { border: 1px solid #000; } </style> </head> <body> <p>test.jpg</p> <canvas id="canvas0" width="256" height="517"></canvas> <p>test.png</p> <canvas id="canvas1" width="256" height="517"></canvas> <p>test.jp2</p> <canvas id="canvas2" width="256" height="517"></canvas> <p>test.gif</p> <canvas id="canvas3" width="256" height="517"></canvas> <script> [ 'test.jpg', 'test.png', 'test.jp2', 'test.gif' ].forEach(function(imgName, index) { var canvas = document.getElementById('canvas' + index); var img = new Image(); img.onload = function() { var ctx = canvas.getContext('2d'); var h = 127; var y = 517 - h; ctx.drawImage( img, 0, y, 256, h, 0, y, 256, h ); }; img.src = imgName; }); </script> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 192807
:
357545
| 357546 |
357548