[Pkg-chromium-maint] Bug#789176: chromium: in javascript method toDataUrl of Canvas object returns empty result for "image/jpeg" argument
Sergei Orlov
wladimirych at gmail.com
Thu Jun 18 15:22:03 UTC 2015
Package: chromium
Version: 43.0.2357.124-1
Severity: important
Dear Maintainer,
In javascript when saving canvas contents to data-url as type "image/jpeg" I get data-url with empty contents.
Here is a snippet demonstrating bug:
<head>
<body>
<script>
var canvas = document.createElement('canvas');
canvas.width = 100;
canvas.heigh = 100;
var dataUrl = canvas.toDataURL("image/jpeg");
var serialized = dataUrl.split(",")[1];
var status, message;
if (serialized.length) {
status = 'PASS'
} else {
status = 'FAILED'
}
message = "<h1>" + status + "</h1>" + dataUrl.substring(0, 100);
document.write(message);
</script>
</body>
</head>
You can view result here: https://jsfiddle.net/pb68a9oo/
Result of toDataUrl: "data:,"
Expected result: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wCEAAUDAw..."
Saving as "image/png" produces expected result.
Test for "image/jpeg" passes in
* iceweasel 38.0.1-5 in Debian testing
* Chromium 43.0.2357.81-0ubuntu0.14.04.1.1089 in Ubuntu
* Chrome 43.0.2357.124 m in WindowsXP
Test fails in
* chromium 43.0.2357.124-1 from sid
* chromium 43.0.2357.65-1 from testing
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (900, 'testing'), (100, 'unstable'), (100, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages chromium depends on:
ii libasound2 1.0.28-1
ii libatk1.0-0 2.12.0-1
ii libc6 2.19-10
ii libcairo2 1.14.0-2.1
ii libcups2 1.7.5-11
ii libdbus-1-3 1.8.6-2
ii libexpat1 2.1.0-6
ii libfontconfig1 2.11.0-6
ii libfreetype6 2.5.2-1.1
ii libgdk-pixbuf2.0-0 2.30.8-1
ii libglib2.0-0 2.42.1-1
ii libgnome-keyring0 3.12.0-1
ii libgtk2.0-0 2.24.24-1
ii libharfbuzz0b 0.9.35-1
ii libjpeg62-turbo 1:1.3.1-10
ii libnspr4 2:4.10.7-1
ii libnspr4-0d 2:4.10.7-1
ii libnss3 2:3.17-1
ii libpango-1.0-0 1.36.8-3
ii libpangocairo-1.0-0 1.36.8-3
ii libpci3 1:3.2.1-2
ii libsnappy1 1.1.2-4
ii libspeechd2 0.8-6
ii libspeex1 1.2~rc1.2-1
ii libsrtp0 1.4.5~20130609~dfsg-1
ii libstdc++6 4.9.1-12
ii libx11-6 2:1.6.2-3
ii libxcomposite1 1:0.4.4-1
ii libxcursor1 1:1.1.14-1
ii libxdamage1 1:1.1.4-2
ii libxext6 2:1.3.2-1
ii libxfixes3 1:5.0.1-2
ii libxi6 2:1.7.4-1
ii libxml2 2.9.1+dfsg1-4
ii libxrandr2 2:1.4.2-1
ii libxrender1 1:0.9.8-1
ii libxslt1.1 1.1.28-2
ii libxss1 1:1.2.2-1
ii libxtst6 2:1.2.2-1
ii x11-utils 7.7+2
ii xdg-utils 1.1.0~rc1+git20111210-7.1
chromium recommends no packages.
Versions of packages chromium suggests:
pn chromium-l10n <none>
-- no debconf information
More information about the Pkg-chromium-maint
mailing list