This commit is contained in:
Fabien LOISON 2016-01-23 21:10:12 +01:00
parent 2417cec479
commit d693397cc3
5 changed files with 7 additions and 17 deletions

View File

@ -137,7 +137,8 @@ This library is built using [Grunt][grunt]. If you change somthing in the `src/`
## Changelog
* **1.1.0:** Allow blur to be applied to ImageData directly (thanks @WebSeed)
* **1.2.0:** Remove alerts and obsolete `netscape.security.PrivilegeManager`
* **1.1.0:** Allow blur to be applied to `ImageData` directly (thanks @WebSeed)
* **1.0.0:** First Release

View File

@ -1,6 +1,6 @@
{
"name": "stackblur-canvas",
"version": "1.1.0",
"version": "1.2.0",
"homepage": "https://github.com/flozz/StackBlur",
"authors": [
"Mario Klingemann"

15
dist/stackblur.js vendored
View File

@ -127,21 +127,10 @@ function getImageDataFromCanvas(canvas, top_x, top_y, width, height)
try {
imageData = context.getImageData(top_x, top_y, width, height);
} catch(e) {
// NOTE: this part is supposedly only needed if you want to work with local files
// so it might be okay to remove the whole try/catch block and just use
// imageData = context.getImageData(top_x, top_y, width, height);
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
imageData = context.getImageData(top_x, top_y, width, height);
} catch(e) {
alert("Cannot access local image");
throw new Error("unable to access local image data: " + e);
return;
}
throw new Error("unable to access local image data: " + e);
return;
}
} catch(e) {
alert("Cannot access image");
throw new Error("unable to access image data: " + e);
}

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "stackblur-canvas",
"version": "1.1.0",
"version": "1.2.0",
"description": "Fast and almost Gaussian blur by Mario Klingemann",
"main": "src/stackblur.js",
"scripts": {