pica 7.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -16
- package/dist/pica.js +475 -230
- package/dist/pica.min.js +2 -2
- package/index.js +86 -40
- package/lib/mathlib.js +2 -2
- package/lib/mm_resize/convolve.c +193 -17
- package/lib/mm_resize/convolve.js +160 -33
- package/lib/mm_resize/convolve.wasm +0 -0
- package/lib/mm_resize/convolve_wasm_base64.js +1 -1
- package/lib/mm_resize/resize.js +25 -21
- package/lib/mm_resize/resize_filter_gen.js +3 -3
- package/lib/mm_resize/resize_filter_info.js +44 -17
- package/lib/mm_resize/resize_wasm.js +24 -14
- package/lib/utils.js +79 -1
- package/lib/worker.js +5 -3
- package/package.json +7 -8
- package/CHANGELOG.md +0 -334
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
const createFilters = require('./resize_filter_gen');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
function hasAlpha(src, width, height) {
|
|
8
|
+
let ptr = 3, len = (width * height * 4)|0;
|
|
9
|
+
while (ptr < len) {
|
|
10
|
+
if (src[ptr] !== 255) return true;
|
|
11
|
+
ptr = (ptr + 4)|0;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
7
17
|
function resetAlpha(dst, width, height) {
|
|
8
18
|
let ptr = 3, len = (width * height * 4)|0;
|
|
9
19
|
while (ptr < len) { dst[ptr] = 0xFF; ptr = (ptr + 4)|0; }
|
|
@@ -46,17 +56,19 @@ module.exports = function resize_wasm(options) {
|
|
|
46
56
|
const offsetX = options.offsetX || 0.0;
|
|
47
57
|
const offsetY = options.offsetY || 0.0;
|
|
48
58
|
const dest = options.dest || new Uint8Array(destW * destH * 4);
|
|
49
|
-
const quality = typeof options.quality === 'undefined' ? 3 : options.quality;
|
|
50
|
-
const alpha = options.alpha || false;
|
|
51
59
|
|
|
52
|
-
const
|
|
53
|
-
|
|
60
|
+
const filter = typeof options.filter === 'undefined' ? 'mks2013' : options.filter;
|
|
61
|
+
const filtersX = createFilters(filter, srcW, destW, scaleX, offsetX),
|
|
62
|
+
filtersY = createFilters(filter, srcH, destH, scaleY, offsetY);
|
|
54
63
|
|
|
55
64
|
// destination is 0 too.
|
|
56
65
|
const src_offset = 0;
|
|
66
|
+
const src_size = Math.max(src.byteLength, dest.byteLength);
|
|
57
67
|
// buffer between convolve passes
|
|
58
|
-
const tmp_offset = this.__align(src_offset +
|
|
59
|
-
const
|
|
68
|
+
const tmp_offset = this.__align(src_offset + src_size);
|
|
69
|
+
const tmp_size = srcH * destW * 4 * 2; // 2 bytes per channel
|
|
70
|
+
|
|
71
|
+
const filtersX_offset = this.__align(tmp_offset + tmp_size);
|
|
60
72
|
const filtersY_offset = this.__align(filtersX_offset + filtersX.byteLength);
|
|
61
73
|
const alloc_bytes = filtersY_offset + filtersY.byteLength;
|
|
62
74
|
|
|
@@ -78,12 +90,16 @@ module.exports = function resize_wasm(options) {
|
|
|
78
90
|
copyInt16asLE(filtersX, mem, filtersX_offset);
|
|
79
91
|
copyInt16asLE(filtersY, mem, filtersY_offset);
|
|
80
92
|
|
|
81
|
-
//
|
|
82
93
|
// Now call webassembly method
|
|
83
94
|
// emsdk does method names with '_'
|
|
84
95
|
const fn = instance.exports.convolveHV || instance.exports._convolveHV;
|
|
85
96
|
|
|
86
|
-
|
|
97
|
+
if (hasAlpha(src, srcW, srcH)) {
|
|
98
|
+
fn(filtersX_offset, filtersY_offset, tmp_offset, srcW, srcH, destW, destH, 1);
|
|
99
|
+
} else {
|
|
100
|
+
fn(filtersX_offset, filtersY_offset, tmp_offset, srcW, srcH, destW, destH, 0);
|
|
101
|
+
resetAlpha(dest, destW, destH);
|
|
102
|
+
}
|
|
87
103
|
|
|
88
104
|
//
|
|
89
105
|
// Copy data back to typed array
|
|
@@ -93,11 +109,5 @@ module.exports = function resize_wasm(options) {
|
|
|
93
109
|
const dest32 = new Uint32Array(dest.buffer);
|
|
94
110
|
dest32.set(new Uint32Array(this.__memory.buffer, 0, destH * destW));
|
|
95
111
|
|
|
96
|
-
// That's faster than doing checks in convolver.
|
|
97
|
-
// !!! Note, canvas data is not premultipled. We don't need other
|
|
98
|
-
// alpha corrections.
|
|
99
|
-
|
|
100
|
-
if (!alpha) resetAlpha(dest, destW, destH);
|
|
101
|
-
|
|
102
112
|
return dest;
|
|
103
113
|
};
|
package/lib/utils.js
CHANGED
|
@@ -101,7 +101,18 @@ module.exports.cib_support = function cib_support(createCanvas) {
|
|
|
101
101
|
|
|
102
102
|
module.exports.worker_offscreen_canvas_support = function worker_offscreen_canvas_support() {
|
|
103
103
|
return new Promise((resolve, reject) => {
|
|
104
|
+
if (typeof OffscreenCanvas === 'undefined') {
|
|
105
|
+
// if OffscreenCanvas is present, we assume browser supports Worker and built-in Promise as well
|
|
106
|
+
resolve(false);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
104
110
|
function workerPayload(self) {
|
|
111
|
+
if (typeof createImageBitmap === 'undefined') {
|
|
112
|
+
self.postMessage(false);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
105
116
|
Promise.resolve()
|
|
106
117
|
.then(() => {
|
|
107
118
|
let canvas = new OffscreenCanvas(10, 10);
|
|
@@ -119,7 +130,74 @@ module.exports.worker_offscreen_canvas_support = function worker_offscreen_canva
|
|
|
119
130
|
|
|
120
131
|
let code = btoa(`(${workerPayload.toString()})(self);`);
|
|
121
132
|
let w = new Worker(`data:text/javascript;base64,${code}`);
|
|
122
|
-
w.onmessage = ev => (ev.data
|
|
133
|
+
w.onmessage = ev => resolve(ev.data);
|
|
123
134
|
w.onerror = reject;
|
|
135
|
+
}).then(result => result, () => false);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
// Check if canvas.getContext('2d').getImageData can be used,
|
|
140
|
+
// FireFox randomizes the output of that function in `privacy.resistFingerprinting` mode
|
|
141
|
+
module.exports.can_use_canvas = function can_use_canvas(createCanvas) {
|
|
142
|
+
let usable = false;
|
|
143
|
+
try {
|
|
144
|
+
let canvas = createCanvas(2, 1);
|
|
145
|
+
let ctx = canvas.getContext('2d');
|
|
146
|
+
|
|
147
|
+
let d = ctx.createImageData(2, 1);
|
|
148
|
+
d.data[0] = 12; d.data[1] = 23; d.data[2] = 34; d.data[3] = 255;
|
|
149
|
+
d.data[4] = 45; d.data[5] = 56; d.data[6] = 67; d.data[7] = 255;
|
|
150
|
+
ctx.putImageData(d, 0, 0);
|
|
151
|
+
d = null;
|
|
152
|
+
|
|
153
|
+
d = ctx.getImageData(0, 0, 2, 1);
|
|
154
|
+
|
|
155
|
+
if (d.data[0] === 12 && d.data[1] === 23 && d.data[2] === 34 && d.data[3] === 255 &&
|
|
156
|
+
d.data[4] === 45 && d.data[5] === 56 && d.data[6] === 67 && d.data[7] === 255) {
|
|
157
|
+
usable = true;
|
|
158
|
+
}
|
|
159
|
+
} catch (err) {}
|
|
160
|
+
|
|
161
|
+
return usable;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
// Check if createImageBitmap(img, sx, sy, sw, sh) signature works correctly
|
|
166
|
+
// with JPEG images oriented with Exif;
|
|
167
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1220671
|
|
168
|
+
// TODO: remove after it's fixed in chrome for at least 2 releases
|
|
169
|
+
module.exports.cib_can_use_region = function cib_can_use_region() {
|
|
170
|
+
return new Promise(resolve => {
|
|
171
|
+
if (typeof createImageBitmap === 'undefined') {
|
|
172
|
+
resolve(false);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
let image = new Image();
|
|
177
|
+
image.src = 'data:image/jpeg;base64,' +
|
|
178
|
+
'/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAA' +
|
|
179
|
+
'AABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9' +
|
|
180
|
+
'sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRc' +
|
|
181
|
+
'ZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoa' +
|
|
182
|
+
'GhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRA' +
|
|
183
|
+
'f/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAA' +
|
|
184
|
+
'IQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAA' +
|
|
185
|
+
'AAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIB' +
|
|
186
|
+
'AT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAA' +
|
|
187
|
+
'AAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAA' +
|
|
188
|
+
'AAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQ' +
|
|
189
|
+
'QAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z';
|
|
190
|
+
|
|
191
|
+
image.onload = () => {
|
|
192
|
+
createImageBitmap(image, 0, 0, image.width, image.height).then(bitmap => {
|
|
193
|
+
if (bitmap.width === image.width && bitmap.height === image.height) {
|
|
194
|
+
resolve(true);
|
|
195
|
+
} else {
|
|
196
|
+
resolve(false);
|
|
197
|
+
}
|
|
198
|
+
}, () => resolve(false));
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
image.onerror = () => resolve(false);
|
|
124
202
|
});
|
|
125
203
|
};
|
package/lib/worker.js
CHANGED
|
@@ -14,14 +14,16 @@ module.exports = function () {
|
|
|
14
14
|
|
|
15
15
|
if (!tileOpts.src && tileOpts.srcBitmap) {
|
|
16
16
|
let canvas = new OffscreenCanvas(tileOpts.width, tileOpts.height);
|
|
17
|
-
let ctx = canvas.getContext('2d'
|
|
17
|
+
let ctx = canvas.getContext('2d');
|
|
18
18
|
ctx.drawImage(tileOpts.srcBitmap, 0, 0);
|
|
19
19
|
tileOpts.src = ctx.getImageData(0, 0, tileOpts.width, tileOpts.height).data;
|
|
20
20
|
canvas.width = canvas.height = 0;
|
|
21
21
|
canvas = null;
|
|
22
22
|
tileOpts.srcBitmap.close();
|
|
23
23
|
tileOpts.srcBitmap = null;
|
|
24
|
-
|
|
24
|
+
// Temporary force out data to typed array, because Chrome have artefacts
|
|
25
|
+
// https://github.com/nodeca/pica/issues/223
|
|
26
|
+
// returnBitmap = true;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
if (!mathLib) mathLib = new MathLib(ev.data.features);
|
|
@@ -33,7 +35,7 @@ module.exports = function () {
|
|
|
33
35
|
if (returnBitmap) {
|
|
34
36
|
let toImageData = new ImageData(new Uint8ClampedArray(data), tileOpts.toWidth, tileOpts.toHeight);
|
|
35
37
|
let canvas = new OffscreenCanvas(tileOpts.toWidth, tileOpts.toHeight);
|
|
36
|
-
let ctx = canvas.getContext('2d'
|
|
38
|
+
let ctx = canvas.getContext('2d');
|
|
37
39
|
|
|
38
40
|
ctx.putImageData(toImageData, 0, 0);
|
|
39
41
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pica",
|
|
3
3
|
"description": "High quality image resize in browser.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.0.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"resize",
|
|
7
7
|
"scale",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"glur": "^1.1.2",
|
|
33
|
-
"inherits": "^2.0.3",
|
|
34
33
|
"multimath": "^2.0.0",
|
|
35
34
|
"object-assign": "^4.1.1",
|
|
36
35
|
"webworkify": "^1.5.0"
|
|
@@ -40,15 +39,15 @@
|
|
|
40
39
|
"@babel/preset-env": "^7.1.0",
|
|
41
40
|
"babelify": "^10.0.0",
|
|
42
41
|
"benchmark": "^2.1.0",
|
|
43
|
-
"browserify": "^
|
|
42
|
+
"browserify": "^17.0.0",
|
|
44
43
|
"browserify-header": "^1.0.1",
|
|
45
44
|
"derequire": "^2.1.0",
|
|
46
|
-
"electron": "^
|
|
47
|
-
"electron-mocha": "^
|
|
48
|
-
"eslint": "^
|
|
45
|
+
"electron": "^16.0.4",
|
|
46
|
+
"electron-mocha": "^11.0.2",
|
|
47
|
+
"eslint": "^8.3.0",
|
|
49
48
|
"gh-pages": "^3.1.0",
|
|
50
|
-
"mocha": "^
|
|
49
|
+
"mocha": "^9.1.3",
|
|
51
50
|
"pixelmatch": "^5.0.2",
|
|
52
|
-
"terser": "^
|
|
51
|
+
"terser": "^5.10.0"
|
|
53
52
|
}
|
|
54
53
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## [7.0.0] - 2021-05-23
|
|
10
|
-
### Changed
|
|
11
|
-
- [BREAKING] Rewrite unsharp mask, use `V` channel of HSV instead of `L` channel
|
|
12
|
-
of HSL, to reduce color shift (#209).
|
|
13
|
-
- [BREAKING] Unsharp mask options are now more close to Photoshop (`unsharpAmount`
|
|
14
|
-
should be multiplied by 2 and `unsharpThreshold` should be divided by 2
|
|
15
|
-
if you switch from v6.x).
|
|
16
|
-
- Splitted big `Pica` methods to smaller ones.
|
|
17
|
-
- Use docker to build webassembly modules.
|
|
18
|
-
|
|
19
|
-
### Added
|
|
20
|
-
- Use `OffscreenCanvas` when possible (extract image bitmap in webworker).
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## [6.1.1] - 2020-08-20
|
|
24
|
-
### Fixed
|
|
25
|
-
- Aded Safari canvas GC workaround, #199.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## [6.1.0] - 2020-07-10
|
|
29
|
-
### Added
|
|
30
|
-
- Aded OffscreenCanvas support, #195.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## [6.0.0] - 2020-06-25
|
|
34
|
-
### Changed
|
|
35
|
-
- Use `dist/pica.js` as main entry. No more workarounds needed for webpack.
|
|
36
|
-
- Avoid babelify dependency in dependent packages if browserify used.
|
|
37
|
-
- Rewrite build scripts.
|
|
38
|
-
|
|
39
|
-
### Added
|
|
40
|
-
- Added `ImageBitmap` input support.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## [5.3.0] - 2020-06-09
|
|
44
|
-
### Changed
|
|
45
|
-
- Use `derequire` to allow nested `browserify` for `/dist/pica.js`.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## [5.2.0] - 2020-05-25
|
|
49
|
-
### Added
|
|
50
|
-
- Aded OffscreenCanvas support, #195.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## [5.1.1] - 2020-05-18
|
|
54
|
-
### Fixed
|
|
55
|
-
- Suppress `createImageBitmap` errors to use fallback, #190.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## [5.1.0] - 2019-07-15
|
|
59
|
-
### Changed
|
|
60
|
-
- Bump multimath dependency.
|
|
61
|
-
|
|
62
|
-
### Fixed
|
|
63
|
-
- Avoid possible CSP warnings, caused by WASM check, when feature not requested
|
|
64
|
-
in options.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## [5.0.1] - 2019-07-12
|
|
68
|
-
### Fixed
|
|
69
|
-
- Fix unsharp crash when CIB enabled (from 4.0.0), #160.
|
|
70
|
-
|
|
71
|
-
### Changed
|
|
72
|
-
- Dev deps bump.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
## [5.0.0] - 2018-11-02
|
|
76
|
-
### Changed
|
|
77
|
-
- Maintenance, babelify upgrade: switch to @babel/core and @babel/preset-env.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## [4.2.0] - 2018-10-25
|
|
81
|
-
### Fixed
|
|
82
|
-
- Added bounds check for invalid output canvas size (#155).
|
|
83
|
-
|
|
84
|
-
### Changed
|
|
85
|
-
- Maintenance: dev deps bump.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## [4.1.1] - 2018-03-31
|
|
89
|
-
### Changed
|
|
90
|
-
- Should return result via promise (regression), fix #139.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
## [4.1.0] - 2018-03-27
|
|
94
|
-
### Changed
|
|
95
|
-
- Resize in multiple steps for big scales, fix #135.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## [4.0.2] - 2018-03-05
|
|
99
|
-
### Fixed
|
|
100
|
-
- Multimath bump, should fix issue with broken WebAssembly engine in IOS 11.2.x
|
|
101
|
-
Webkit (Safary/Chrome).
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
## [4.0.1] - 2017-10-13
|
|
105
|
-
### Fixed
|
|
106
|
-
- Attempt to fix failure when WebAssembly disabled via CSP.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
## [4.0.0] - 2017-09-30
|
|
110
|
-
### Changed
|
|
111
|
-
- Internals rewritten to use `multimath` library.
|
|
112
|
-
- WebAssembly implementation for `unsharp mask`, as bonus.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
## [3.0.6] - 2017-07-13
|
|
116
|
-
### Fixed
|
|
117
|
-
- More constrains for `createImageBitmap()` use. Filter out browsers
|
|
118
|
-
without `ImageBitmap.prototype.close()` method (Chrome 51 etc).
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
## [3.0.5] - 2017-06-30
|
|
122
|
-
### Fixed
|
|
123
|
-
- Avoid Promise use in webworker. Should help with IE11, which suddently
|
|
124
|
-
fixed creating of webworkers from data URI.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
## [3.0.4] - 2017-04-20
|
|
128
|
-
### Fixed
|
|
129
|
-
- IE fix.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
## [3.0.3] - 2017-04-18
|
|
133
|
-
### Fixed
|
|
134
|
-
- Fixed non working `.createImageBitmap()` resize, but disabled
|
|
135
|
-
by default due bad quality.
|
|
136
|
-
|
|
137
|
-
### Added
|
|
138
|
-
- Added debug messages.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
## [3.0.2] - 2017-04-16
|
|
142
|
-
### Fixed
|
|
143
|
-
- Fix wasm crash on upscale, #87.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
## [3.0.1] - 2017-04-14
|
|
147
|
-
### Fixed
|
|
148
|
-
- Add missed `.set()` fallback for ancient browsers.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## [3.0.0] - 2017-04-11
|
|
152
|
-
### Added
|
|
153
|
-
- Add WebAssembly resizer.
|
|
154
|
-
- Add createImageBitmap() resizer.
|
|
155
|
-
- Add .toBlob() method.
|
|
156
|
-
|
|
157
|
-
### Changed
|
|
158
|
-
- Major rewrite. New API, promise-based.
|
|
159
|
-
- Add async image decode via createImageBitmap().
|
|
160
|
-
|
|
161
|
-
### Removed
|
|
162
|
-
- Drop WebGL resizer.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
## [2.0.8] - 2016-10-01
|
|
166
|
-
### Changed
|
|
167
|
-
- Set default number of CPUs (workers) to 1 if `navigator.hardwareConcurrency`
|
|
168
|
-
not supported (ancient browsers).
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
## [2.0.7] - 2016-10-01
|
|
172
|
-
### Fixed
|
|
173
|
-
- Fix Safary bug (grid could appear on downscaled image).
|
|
174
|
-
|
|
175
|
-
### Changed
|
|
176
|
-
- WEBGL shaders rework (still buggy, not for production).
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
## [2.0.6] - 2016-08-04
|
|
180
|
-
### Fixed
|
|
181
|
-
- Fix tiler math: bad rounding could produce tiles out of src area, #61.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
## [2.0.5] - 2016-07-19
|
|
185
|
-
### Fixed
|
|
186
|
-
- Fix mem leak: release objectURL, used to create Web Workers.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
## [2.0.4] - 2016-06-24
|
|
190
|
-
### Changed
|
|
191
|
-
- Deps bump (`webworkify`). Previous version had problems with IE Edge, #56.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
## [2.0.3] - 2016-06-07
|
|
195
|
-
### Changed
|
|
196
|
-
- Deps bump. Use fresh `webworkify` with proper ObjectURL release, #55.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
## [2.0.2] - 2016-03-30
|
|
200
|
-
### Changed
|
|
201
|
-
- Optimised previous fix.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
## [2.0.1] - 2016-03-30
|
|
205
|
-
### Fixed
|
|
206
|
-
- Fixed garbage on image edge tiles when alpha exists.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
## [2.0.0] - 2016-03-12
|
|
210
|
-
### Added
|
|
211
|
-
- Support `Image()` as input src.
|
|
212
|
-
|
|
213
|
-
### Changed
|
|
214
|
-
- Architecture rework: images are now splitted to tiles to restrict memory use
|
|
215
|
-
and allow parallel processing.
|
|
216
|
-
- Built-in WebWorkers manager to use all available CPU cores.
|
|
217
|
-
- Feature flags (WW, WEBGL) are forced to `false` after resize call,
|
|
218
|
-
if feature not supported or disabled due fatal error.
|
|
219
|
-
- `unsharpRadius` range restricted to 0.5..2.0.
|
|
220
|
-
- Experimental code for WebGL support (noisy & buggy, disabled by default).
|
|
221
|
-
- `.resizeBuffer()` is no longer recommended for use. It does not use webworkers
|
|
222
|
-
anymore (and option `transferable` is not used too).
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
## [1.1.1] - 2015-11-10
|
|
226
|
-
### Changed
|
|
227
|
-
- Bumped `glur` version to fix bug in unsharp mask with vertical images.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
## [1.1.0] - 2015-11-09
|
|
231
|
-
### Changed
|
|
232
|
-
- Unsharp mask now useable.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
## [1.0.8] - 2015-10-28
|
|
236
|
-
### Fixed
|
|
237
|
-
- Fixed brightness loss due missed value rounding in convolvers.
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
## [1.0.7] - 2014-11-18
|
|
241
|
-
### Fixed
|
|
242
|
-
- Fixed alpha reset for images without alpha channel (regression in 1.0.5).
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
## [1.0.6] - 2014-11-08
|
|
246
|
-
### Changed
|
|
247
|
-
- Removed alpha correction, because canvas data is not premultipled (#13).
|
|
248
|
-
Thanks to @devongovett.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
## [1.0.5] - 2014-11-03
|
|
252
|
-
### Changed
|
|
253
|
-
- Expose WebWorker on pica call, to allow early termination of task.
|
|
254
|
-
- Minor speed opts.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
## [1.0.4] - 2014-10-04
|
|
258
|
-
### Added
|
|
259
|
-
- Added transferable objects support.
|
|
260
|
-
|
|
261
|
-
### Fixed
|
|
262
|
-
- Fixed demo to fork over ssl too.
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
## [1.0.3] - 2014-09-29
|
|
266
|
-
### Added
|
|
267
|
-
- Added unsharp mask implementation (very naive). Need futher work.
|
|
268
|
-
|
|
269
|
-
### Changed
|
|
270
|
-
- ~25% speed boost (thanks to @mraleph for advice).
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
## [1.0.2] - 2014-09-27
|
|
274
|
-
### Fixed
|
|
275
|
-
- Improved capabilities detection.
|
|
276
|
-
- `.WW` now shows if pica can use Web Workers or not.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
## [1.0.1] - 2014-09-25
|
|
280
|
-
### Added
|
|
281
|
-
- Enchanced API to allow pass destination buffer by reference.
|
|
282
|
-
|
|
283
|
-
### Fixed
|
|
284
|
-
- Added IE workarounds. Thanks to @noomorph.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
## [1.0.0] - 2014-09-24
|
|
288
|
-
### Changed
|
|
289
|
-
- First release.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
[7.0.0]: https://github.com/nodeca/pica/compare/6.1.1...7.0.0
|
|
293
|
-
[6.1.1]: https://github.com/nodeca/pica/compare/6.1.0...6.1.1
|
|
294
|
-
[6.1.0]: https://github.com/nodeca/pica/compare/6.0.0...6.1.0
|
|
295
|
-
[6.0.0]: https://github.com/nodeca/pica/compare/5.3.0...6.0.0
|
|
296
|
-
[5.3.0]: https://github.com/nodeca/pica/compare/5.2.0...5.3.0
|
|
297
|
-
[5.2.0]: https://github.com/nodeca/pica/compare/5.1.1...5.2.0
|
|
298
|
-
[5.1.1]: https://github.com/nodeca/pica/compare/5.1.0...5.1.1
|
|
299
|
-
[5.1.0]: https://github.com/nodeca/pica/compare/5.0.1...5.1.0
|
|
300
|
-
[5.0.1]: https://github.com/nodeca/pica/compare/5.0.0...5.0.1
|
|
301
|
-
[5.0.0]: https://github.com/nodeca/pica/compare/4.2.0...5.0.0
|
|
302
|
-
[4.2.0]: https://github.com/nodeca/pica/compare/4.1.1...4.2.0
|
|
303
|
-
[4.1.1]: https://github.com/nodeca/pica/compare/4.1.0...4.1.1
|
|
304
|
-
[4.1.0]: https://github.com/nodeca/pica/compare/4.0.2...4.1.0
|
|
305
|
-
[4.0.2]: https://github.com/nodeca/pica/compare/4.0.1...4.0.2
|
|
306
|
-
[4.0.1]: https://github.com/nodeca/pica/compare/4.0.0...4.0.1
|
|
307
|
-
[4.0.0]: https://github.com/nodeca/pica/compare/3.0.6...4.0.0
|
|
308
|
-
[3.0.6]: https://github.com/nodeca/pica/compare/3.0.5...3.0.6
|
|
309
|
-
[3.0.5]: https://github.com/nodeca/pica/compare/3.0.4...3.0.5
|
|
310
|
-
[3.0.4]: https://github.com/nodeca/pica/compare/3.0.3...3.0.4
|
|
311
|
-
[3.0.3]: https://github.com/nodeca/pica/compare/3.0.2...3.0.3
|
|
312
|
-
[3.0.2]: https://github.com/nodeca/pica/compare/3.0.1...3.0.2
|
|
313
|
-
[3.0.1]: https://github.com/nodeca/pica/compare/3.0.0...3.0.1
|
|
314
|
-
[3.0.0]: https://github.com/nodeca/pica/compare/2.0.8...3.0.0
|
|
315
|
-
[2.0.8]: https://github.com/nodeca/pica/compare/2.0.7...2.0.8
|
|
316
|
-
[2.0.7]: https://github.com/nodeca/pica/compare/2.0.6...2.0.7
|
|
317
|
-
[2.0.6]: https://github.com/nodeca/pica/compare/2.0.5...2.0.6
|
|
318
|
-
[2.0.5]: https://github.com/nodeca/pica/compare/2.0.4...2.0.5
|
|
319
|
-
[2.0.4]: https://github.com/nodeca/pica/compare/2.0.3...2.0.4
|
|
320
|
-
[2.0.3]: https://github.com/nodeca/pica/compare/2.0.2...2.0.3
|
|
321
|
-
[2.0.2]: https://github.com/nodeca/pica/compare/2.0.1...2.0.2
|
|
322
|
-
[2.0.1]: https://github.com/nodeca/pica/compare/2.0.0...2.0.1
|
|
323
|
-
[2.0.0]: https://github.com/nodeca/pica/compare/1.1.1...2.0.0
|
|
324
|
-
[1.1.1]: https://github.com/nodeca/pica/compare/1.1.0...1.1.1
|
|
325
|
-
[1.1.0]: https://github.com/nodeca/pica/compare/1.0.8...1.1.0
|
|
326
|
-
[1.0.8]: https://github.com/nodeca/pica/compare/1.0.7...1.0.8
|
|
327
|
-
[1.0.7]: https://github.com/nodeca/pica/compare/1.0.6...1.0.7
|
|
328
|
-
[1.0.6]: https://github.com/nodeca/pica/compare/1.0.5...1.0.6
|
|
329
|
-
[1.0.5]: https://github.com/nodeca/pica/compare/1.0.4...1.0.5
|
|
330
|
-
[1.0.4]: https://github.com/nodeca/pica/compare/1.0.3...1.0.4
|
|
331
|
-
[1.0.3]: https://github.com/nodeca/pica/compare/1.0.2...1.0.3
|
|
332
|
-
[1.0.2]: https://github.com/nodeca/pica/compare/1.0.1...1.0.2
|
|
333
|
-
[1.0.1]: https://github.com/nodeca/pica/compare/1.0.0...1.0.1
|
|
334
|
-
[1.0.0]: https://github.com/nodeca/pica/releases/tag/1.0.0
|