diff --git a/README.md b/README.md
index fea0de4..eb821f0 100644
--- a/README.md
+++ b/README.md
@@ -120,9 +120,9 @@ Warning: this API uses [Promises](https://promisesaplus.com/), because it's not
* [binaryStringToBlob(binary, type)](#binaryStringToBlob)
* [blobToBase64String(blob)](#blobToBase64String)
* [dataURLToBlob(dataURL)](#dataURLToBlob)
-* [imgSrcToDataURL(src, type, crossOrigin)](#imgSrcToDataURL)
-* [canvasToBlob(canvas, type)](#canvasToBlob)
-* [imgSrcToBlob(src, type, crossOrigin)](#imgSrcToBlob)
+* [imgSrcToDataURL(src, type, crossOrigin, quality)](#imgSrcToDataURL)
+* [canvasToBlob(canvas, type, quality)](#canvasToBlob)
+* [imgSrcToBlob(src, type, crossOrigin, quality)](#imgSrcToBlob)
* [arrayBufferToBlob(buffer, type)](#arrayBufferToBlob)
* [blobToArrayBuffer(blob)](#blobToArrayBuffer)
@@ -288,7 +288,7 @@ blobUtil.dataURLToBlob(dataURL).then(function (blob) {
```
-###imgSrcToDataURL(src, type, crossOrigin)
+###imgSrcToDataURL(src, type, crossOrigin, quality)
Convert an image's src URL to a data URL by loading the image and painting
it to a canvas. Returns a Promise.
@@ -301,6 +301,8 @@ will only paint the first frame of an animated GIF.
- type `string` | `undefined` - the content type (optional, defaults to 'image/png')
- crossOrigin `string` | `undefined` - for CORS-enabled images, set this to
'Anonymous' to avoid "tainted canvas" errors
+- quality `number` | `undefined` - a number between 0 and 1 indicating image quality
+ if the requested type is 'image/jpeg' or 'image/webp'
**Returns**: `Promise` - Promise that resolves with the data URL string
@@ -324,13 +326,15 @@ blobUtil.imgSrcToDataURL('http://some-other-site.com/img.jpg', 'image/jpeg',
```
-###canvasToBlob(canvas, type)
+###canvasToBlob(canvas, type, quality)
Convert a canvas to a Blob. Returns a Promise.
**Params**
- canvas `string`
- type `string` | `undefined` - the content type (optional, defaults to 'image/png')
+- quality `number` | `undefined` - a number between 0 and 1 indicating image quality
+ if the requested type is 'image/jpeg' or 'image/webp'
**Returns**: `Promise` - Promise that resolves with the Blob
@@ -357,7 +361,7 @@ blobUtil.canvasToBlob(canvas, 'image/webp').then(function (blob) {
```
-###imgSrcToBlob(src, type, crossOrigin)
+###imgSrcToBlob(src, type, crossOrigin, quality)
Convert an image's src URL to a Blob by loading the image and painting
it to a canvas. Returns a Promise.
@@ -370,6 +374,8 @@ will only paint the first frame of an animated GIF.
- type `string` | `undefined` - the content type (optional, defaults to 'image/png')
- crossOrigin `string` | `undefined` - for CORS-enabled images, set this to
'Anonymous' to avoid "tainted canvas" errors
+- quality `number` | `undefined` - a number between 0 and 1 indicating image quality
+ if the requested type is 'image/jpeg' or 'image/webp'
**Returns**: `Promise` - Promise that resolves with the Blob
diff --git a/doc/fonts/OpenSans-Bold-webfont.eot b/doc/fonts/OpenSans-Bold-webfont.eot
new file mode 100644
index 0000000..5d20d91
Binary files /dev/null and b/doc/fonts/OpenSans-Bold-webfont.eot differ
diff --git a/doc/fonts/OpenSans-Bold-webfont.svg b/doc/fonts/OpenSans-Bold-webfont.svg
new file mode 100644
index 0000000..3ed7be4
--- /dev/null
+++ b/doc/fonts/OpenSans-Bold-webfont.svg
@@ -0,0 +1,1830 @@
+
+
+
\ No newline at end of file
diff --git a/doc/fonts/OpenSans-Bold-webfont.woff b/doc/fonts/OpenSans-Bold-webfont.woff
new file mode 100644
index 0000000..1205787
Binary files /dev/null and b/doc/fonts/OpenSans-Bold-webfont.woff differ
diff --git a/doc/fonts/OpenSans-BoldItalic-webfont.eot b/doc/fonts/OpenSans-BoldItalic-webfont.eot
new file mode 100644
index 0000000..1f639a1
Binary files /dev/null and b/doc/fonts/OpenSans-BoldItalic-webfont.eot differ
diff --git a/doc/fonts/OpenSans-BoldItalic-webfont.svg b/doc/fonts/OpenSans-BoldItalic-webfont.svg
new file mode 100644
index 0000000..6a2607b
--- /dev/null
+++ b/doc/fonts/OpenSans-BoldItalic-webfont.svg
@@ -0,0 +1,1830 @@
+
+
+
\ No newline at end of file
diff --git a/doc/fonts/OpenSans-BoldItalic-webfont.woff b/doc/fonts/OpenSans-BoldItalic-webfont.woff
new file mode 100644
index 0000000..ed760c0
Binary files /dev/null and b/doc/fonts/OpenSans-BoldItalic-webfont.woff differ
diff --git a/doc/fonts/OpenSans-Italic-webfont.eot b/doc/fonts/OpenSans-Italic-webfont.eot
new file mode 100644
index 0000000..0c8a0ae
Binary files /dev/null and b/doc/fonts/OpenSans-Italic-webfont.eot differ
diff --git a/doc/fonts/OpenSans-Italic-webfont.svg b/doc/fonts/OpenSans-Italic-webfont.svg
new file mode 100644
index 0000000..e1075dc
--- /dev/null
+++ b/doc/fonts/OpenSans-Italic-webfont.svg
@@ -0,0 +1,1830 @@
+
+
+
\ No newline at end of file
diff --git a/doc/fonts/OpenSans-Italic-webfont.woff b/doc/fonts/OpenSans-Italic-webfont.woff
new file mode 100644
index 0000000..ff652e6
Binary files /dev/null and b/doc/fonts/OpenSans-Italic-webfont.woff differ
diff --git a/doc/fonts/OpenSans-Light-webfont.eot b/doc/fonts/OpenSans-Light-webfont.eot
new file mode 100644
index 0000000..1486840
Binary files /dev/null and b/doc/fonts/OpenSans-Light-webfont.eot differ
diff --git a/doc/fonts/OpenSans-Light-webfont.svg b/doc/fonts/OpenSans-Light-webfont.svg
new file mode 100644
index 0000000..11a472c
--- /dev/null
+++ b/doc/fonts/OpenSans-Light-webfont.svg
@@ -0,0 +1,1831 @@
+
+
+
\ No newline at end of file
diff --git a/doc/fonts/OpenSans-Light-webfont.woff b/doc/fonts/OpenSans-Light-webfont.woff
new file mode 100644
index 0000000..e786074
Binary files /dev/null and b/doc/fonts/OpenSans-Light-webfont.woff differ
diff --git a/doc/fonts/OpenSans-LightItalic-webfont.eot b/doc/fonts/OpenSans-LightItalic-webfont.eot
new file mode 100644
index 0000000..8f44592
Binary files /dev/null and b/doc/fonts/OpenSans-LightItalic-webfont.eot differ
diff --git a/doc/fonts/OpenSans-LightItalic-webfont.svg b/doc/fonts/OpenSans-LightItalic-webfont.svg
new file mode 100644
index 0000000..431d7e3
--- /dev/null
+++ b/doc/fonts/OpenSans-LightItalic-webfont.svg
@@ -0,0 +1,1835 @@
+
+
+
\ No newline at end of file
diff --git a/doc/fonts/OpenSans-LightItalic-webfont.woff b/doc/fonts/OpenSans-LightItalic-webfont.woff
new file mode 100644
index 0000000..43e8b9e
Binary files /dev/null and b/doc/fonts/OpenSans-LightItalic-webfont.woff differ
diff --git a/doc/fonts/OpenSans-Regular-webfont.eot b/doc/fonts/OpenSans-Regular-webfont.eot
new file mode 100644
index 0000000..6bbc3cf
Binary files /dev/null and b/doc/fonts/OpenSans-Regular-webfont.eot differ
diff --git a/doc/fonts/OpenSans-Regular-webfont.svg b/doc/fonts/OpenSans-Regular-webfont.svg
new file mode 100644
index 0000000..25a3952
--- /dev/null
+++ b/doc/fonts/OpenSans-Regular-webfont.svg
@@ -0,0 +1,1831 @@
+
+
+
\ No newline at end of file
diff --git a/doc/fonts/OpenSans-Regular-webfont.woff b/doc/fonts/OpenSans-Regular-webfont.woff
new file mode 100644
index 0000000..e231183
Binary files /dev/null and b/doc/fonts/OpenSans-Regular-webfont.woff differ
diff --git a/doc/index.js.html b/doc/index.js.html
index 5243729..5aed6d9 100644
--- a/doc/index.js.html
+++ b/doc/index.js.html
@@ -28,10 +28,9 @@
+ Convert an image's src URL to a Blob by loading the image and painting
it to a canvas. Returns a Promise.
Note: this will coerce the image to the desired content type, and it
will only paint the first frame of an animated GIF.
-
-
+
-
-
-
+
+
+
+
+
+
Parameters:
-
Parameters:
-
@@ -1866,36 +1905,64 @@ will only paint the first frame of an animated GIF.
-
+
crossOrigin
-
+
-
-
+
+
string
|
undefined
-
+
+
-
-
+
for CORS-enabled images, set this to
'Anonymous' to avoid "tainted canvas" errors
+
+
+
+
quality
+
+
+
+
+
+number
+|
+
+undefined
+
+
+
+
+
+
+
+
+
+
a number between 0 and 1 indicating image quality
+ if the requested type is 'image/jpeg' or 'image/webp'
+
+
+
-
-
+
+
+
@@ -1920,12 +1987,14 @@ will only paint the first frame of an animated GIF.
+
+
+ Convert an image's src URL to a data URL by loading the image and painting
it to a canvas. Returns a Promise.
Note: this will coerce the image to the desired content type, and it
will only paint the first frame of an animated GIF.
-
-
+
-
-
-
+
+
+
+
+
+
Parameters:
-
Parameters:
-
@@ -2075,36 +2142,64 @@ will only paint the first frame of an animated GIF.
-
+
crossOrigin
-
+
-
-
+
+
string
|
undefined
-
+
+
-
-
+
for CORS-enabled images, set this to
'Anonymous' to avoid "tainted canvas" errors
+
+
+
+
quality
+
+
+
+
+
+number
+|
+
+undefined
+
+
+
+
+
+
+
+
+
+
a number between 0 and 1 indicating image quality
+ if the requested type is 'image/jpeg' or 'image/webp'
+
+
+
-
-
+
+
+
@@ -2129,12 +2224,14 @@ will only paint the first frame of an animated GIF.
+
+