Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a test for JPEG-XR export

  • Loading branch information...
commit d3893725795ee688a970d93bf884b02935474251 1 parent f1bd18c
@NielsLeenheer authored
Showing with 19 additions and 0 deletions.
  1. +3 −0  scripts/data.js
  2. +16 −0 scripts/engine.js
View
3  scripts/data.js
@@ -1454,6 +1454,9 @@ var tests = [
id: 'jpeg',
name: 'JPEG support'
}, {
+ id: 'jpegxr',
+ name: 'JPEG-XR support'
+ }, {
id: 'webp',
name: 'WebP support'
}
View
16 scripts/engine.js
@@ -841,6 +841,22 @@ Test = (function() {
var passed = false;
if (this.canvas.getContext) {
try {
+ passed = this.canvas.toDataURL('image/vnd.ms-photo').substring(5,23) == 'image/vnd.ms-photo';
+ }
+ catch(e) {
+ }
+ }
+
+ this.section.setItem({
+ id: 'jpegxr',
+ passed: passed,
+ value: 0
+ });
+
+
+ var passed = false;
+ if (this.canvas.getContext) {
+ try {
passed = this.canvas.toDataURL('image/webp').substring(5,15) == 'image/webp';
}
catch(e) {
Please sign in to comment.
Something went wrong with that request. Please try again.