pdf-parser.js 5.3.1 → 5.3.2
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/dist/image/jpeg2000.cjs
CHANGED
|
@@ -227,8 +227,8 @@ function inverseReversibleComponentTransform(planes) {
|
|
|
227
227
|
const u = planes[1];
|
|
228
228
|
const v = planes[2];
|
|
229
229
|
if (y === void 0 || u === void 0 || v === void 0) return;
|
|
230
|
-
for (
|
|
231
|
-
const green =
|
|
230
|
+
for (const [i, luma] of y.entries()) {
|
|
231
|
+
const green = luma - Math.floor(((u[i] ?? 0) + (v[i] ?? 0)) / RCT_GREEN_RECOVERY_DIVISOR);
|
|
232
232
|
const red = (v[i] ?? 0) + green;
|
|
233
233
|
const blue = (u[i] ?? 0) + green;
|
|
234
234
|
y[i] = red;
|
|
@@ -245,8 +245,7 @@ function inverseIrreversibleComponentTransform(planes) {
|
|
|
245
245
|
const cb = planes[1];
|
|
246
246
|
const cr = planes[2];
|
|
247
247
|
if (y === void 0 || cb === void 0 || cr === void 0) return;
|
|
248
|
-
for (
|
|
249
|
-
const luma = y[i] ?? 0;
|
|
248
|
+
for (const [i, luma] of y.entries()) {
|
|
250
249
|
const blueDiff = cb[i] ?? 0;
|
|
251
250
|
const redDiff = cr[i] ?? 0;
|
|
252
251
|
y[i] = luma + ICT_RED_FROM_CR * redDiff;
|
package/dist/image/jpeg2000.js
CHANGED
|
@@ -226,8 +226,8 @@ function inverseReversibleComponentTransform(planes) {
|
|
|
226
226
|
const u = planes[1];
|
|
227
227
|
const v = planes[2];
|
|
228
228
|
if (y === void 0 || u === void 0 || v === void 0) return;
|
|
229
|
-
for (
|
|
230
|
-
const green =
|
|
229
|
+
for (const [i, luma] of y.entries()) {
|
|
230
|
+
const green = luma - Math.floor(((u[i] ?? 0) + (v[i] ?? 0)) / RCT_GREEN_RECOVERY_DIVISOR);
|
|
231
231
|
const red = (v[i] ?? 0) + green;
|
|
232
232
|
const blue = (u[i] ?? 0) + green;
|
|
233
233
|
y[i] = red;
|
|
@@ -244,8 +244,7 @@ function inverseIrreversibleComponentTransform(planes) {
|
|
|
244
244
|
const cb = planes[1];
|
|
245
245
|
const cr = planes[2];
|
|
246
246
|
if (y === void 0 || cb === void 0 || cr === void 0) return;
|
|
247
|
-
for (
|
|
248
|
-
const luma = y[i] ?? 0;
|
|
247
|
+
for (const [i, luma] of y.entries()) {
|
|
249
248
|
const blueDiff = cb[i] ?? 0;
|
|
250
249
|
const redDiff = cr[i] ?? 0;
|
|
251
250
|
y[i] = luma + ICT_RED_FROM_CR * redDiff;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-parser.js",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Hand-written, dependency-minimal PDF codec: parses arbitrary real-world PDFs and generates new ones, built on its own codec-owned LayoutDocument item model and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|