@photivra/engine 2.1.0 → 2.2.1

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/CITATION.cff +1 -1
  3. package/README.md +6 -6
  4. package/SECURITY.md +1 -1
  5. package/dist/capture/export-jpeg.js +7 -1
  6. package/dist/capture/export-jpeg.js.map +1 -1
  7. package/dist/capture/native-environment-lean.js +5 -2
  8. package/dist/capture/native-environment-lean.js.map +1 -1
  9. package/dist/capture/native-environment-raw.js +2 -2
  10. package/dist/capture/native-environment-raw.js.map +1 -1
  11. package/dist/capture/native-raw-development.js +1 -1
  12. package/dist/capture/native-raw-development.js.map +1 -1
  13. package/dist/capture/native-raw.d.ts +16 -0
  14. package/dist/capture/native-raw.js +16 -3
  15. package/dist/capture/native-raw.js.map +1 -1
  16. package/dist/capture/packed-sensor-raw.d.ts +7 -0
  17. package/dist/capture/packed-sensor-raw.js +6 -2
  18. package/dist/capture/packed-sensor-raw.js.map +1 -1
  19. package/dist/core/pixel-limits.d.ts +14 -0
  20. package/dist/core/pixel-limits.js +40 -0
  21. package/dist/core/pixel-limits.js.map +1 -0
  22. package/dist/core/version.d.ts +1 -1
  23. package/dist/core/version.js +1 -1
  24. package/dist/core/version.js.map +1 -1
  25. package/dist/facade/chart-radiance-batch.d.ts +7 -0
  26. package/dist/facade/chart-radiance-batch.js +7 -3
  27. package/dist/facade/chart-radiance-batch.js.map +1 -1
  28. package/dist/facade/simulate-capture.d.ts +8 -1
  29. package/dist/facade/simulate-capture.js +69 -18
  30. package/dist/facade/simulate-capture.js.map +1 -1
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.js +2 -1
  33. package/dist/index.js.map +1 -1
  34. package/dist/motion/temporal-exposure-sum.d.ts +7 -0
  35. package/dist/motion/temporal-exposure-sum.js +6 -2
  36. package/dist/motion/temporal-exposure-sum.js.map +1 -1
  37. package/dist/optics/irradiance-convolution.d.ts +7 -0
  38. package/dist/optics/irradiance-convolution.js +6 -2
  39. package/dist/optics/irradiance-convolution.js.map +1 -1
  40. package/dist/optics/lens-psf-kernels.d.ts +3 -1
  41. package/dist/optics/lens-psf-kernels.js +7 -2
  42. package/dist/optics/lens-psf-kernels.js.map +1 -1
  43. package/dist/output/native-capture-sdr.d.ts +7 -0
  44. package/dist/output/native-capture-sdr.js +6 -3
  45. package/dist/output/native-capture-sdr.js.map +1 -1
  46. package/dist/output/png-encoder.d.ts +10 -1
  47. package/dist/output/png-encoder.js +10 -4
  48. package/dist/output/png-encoder.js.map +1 -1
  49. package/dist/output/print-jpeg.d.ts +18 -0
  50. package/dist/output/print-jpeg.js +15 -4
  51. package/dist/output/print-jpeg.js.map +1 -1
  52. package/dist/sensor/sampling-aperture.d.ts +15 -0
  53. package/dist/sensor/sampling-aperture.js +31 -10
  54. package/dist/sensor/sampling-aperture.js.map +1 -1
  55. package/docs/API_REFERENCE.md +11 -1
  56. package/docs/QUICK_START.md +112 -4
  57. package/docs/USAGE.md +3 -1
  58. package/docs/api/capture-native-raw.md +11 -2
  59. package/docs/api/capture-packed-sensor-raw.md +7 -1
  60. package/docs/api/core-pixel-limits.md +19 -0
  61. package/docs/api/core-version.md +1 -1
  62. package/docs/api/exports.json +17 -2
  63. package/docs/api/facade-chart-radiance-batch.md +8 -2
  64. package/docs/api/facade-simulate-capture.md +8 -1
  65. package/docs/api/motion-temporal-exposure-sum.md +7 -1
  66. package/docs/api/optics-irradiance-convolution.md +7 -1
  67. package/docs/api/output-native-capture-sdr.md +7 -2
  68. package/docs/api/output-png-encoder.md +8 -1
  69. package/docs/api/output-print-jpeg.md +17 -0
  70. package/package.json +1 -1
@@ -24,10 +24,10 @@ This call is synchronous; any supplied provider must follow its explicit synchro
24
24
 
25
25
  ## NATIVE_CAPTURE_SDR_LIMITS
26
26
 
27
- The exact contract is declared below; use the domain guide for assumptions and staged integration.
27
+ `maximumPixels` is the default pixel limit; a request may raise it with its own `maximumPixels`, up to `ceilingPixels`.
28
28
 
29
29
  ```ts
30
- NATIVE_CAPTURE_SDR_LIMITS = Object.freeze({ maximumPixels: 24_000_000,
30
+ NATIVE_CAPTURE_SDR_LIMITS = Object.freeze({ maximumPixels: 24_000_000, ceilingPixels: FULL_RESOLUTION_CEILING_PIXELS,
31
31
  maximumDimension: 16_384, tileWidth: 256, tileHeight: 32, maximumTileStorageSamples: 32_768 })
32
32
  ```
33
33
 
@@ -51,6 +51,11 @@ export interface NativeCaptureSdrInput {
51
51
  profile: SdrRenderingProfile;
52
52
  /** Limit on the size of the integer output. Checked before anything is allocated or any tile is read. */
53
53
  maximumOutputBytes: number;
54
+ /**
55
+ * Optional opt-in pixel limit for large captures: an integer from 1 to `NATIVE_CAPTURE_SDR_LIMITS.ceilingPixels`.
56
+ * Default `NATIVE_CAPTURE_SDR_LIMITS.maximumPixels` (24 000 000). `maximumOutputBytes` still applies.
57
+ */
58
+ maximumPixels?: number;
54
59
  }
55
60
  ```
56
61
 
@@ -13,9 +13,11 @@ PNG_ENCODER_ID = "photivra-png-rgb-v1" as const
13
13
  ## PNG_ENCODER_LIMITS
14
14
 
15
15
  Limits, checked before allocation. 100 MP (megapixels) of 16-bit RGB is about 600 MB of filtered scanlines.
16
+ `maximumPixels` is the default; a request may raise it with its own `maximumPixels`, up to `ceilingPixels`.
16
17
 
17
18
  ```ts
18
- PNG_ENCODER_LIMITS = Object.freeze({ maximumDimension: 65535, maximumPixels: 100_000_000, maximumIccProfileBytes: 4_000_000 })
19
+ PNG_ENCODER_LIMITS = Object.freeze({ maximumDimension: 65535, maximumPixels: 100_000_000, ceilingPixels: FULL_RESOLUTION_CEILING_PIXELS,
20
+ maximumIccProfileBytes: 4_000_000 })
19
21
  ```
20
22
 
21
23
  ## PngCicpPrimaries
@@ -74,6 +76,11 @@ export interface PngEncodeInput {
74
76
  compression?: "stored" | "fixed-huffman";
75
77
  /** PNG filter type 0..4 for every row, or the specification's minimum-sum-of-absolute-differences heuristic. Default "adaptive". */
76
78
  filter?: "none" | "sub" | "up" | "average" | "paeth" | "adaptive";
79
+ /**
80
+ * Optional opt-in pixel limit: an integer from 1 to `PNG_ENCODER_LIMITS.ceilingPixels`. Default
81
+ * `PNG_ENCODER_LIMITS.maximumPixels` (100 000 000). It does not change the encoded bytes.
82
+ */
83
+ maximumPixels?: number;
77
84
  }
78
85
  ```
79
86
 
@@ -22,6 +22,17 @@ export function parsePrintJpegInput(input:PrintJpegInput):PrintJpegInput;
22
22
 
23
23
  This call is synchronous; any supplied provider must follow its explicit synchronous contract.
24
24
 
25
+ ## PRINT_JPEG_LIMITS
26
+
27
+ Admission limits. `maximumPixels` is the default source limit; a request may raise it with its own
28
+ `maximumPixels`, up to `ceilingPixels`. A raised limit raises the `maximumEncodedBytes` ceiling in proportion
29
+ (256 000 000 bytes per 24 000 000 source pixels).
30
+
31
+ ```ts
32
+ PRINT_JPEG_LIMITS=Object.freeze({maximumPixels:24_000_000,ceilingPixels:FULL_RESOLUTION_CEILING_PIXELS,maximumDimension:16_384,
33
+ maximumEncodedBytes:256_000_000,maximumProviderReads:1_000_000})
34
+ ```
35
+
25
36
  ## PRINT_JPEG_SCHEMA_VERSION
26
37
 
27
38
  The exact contract is declared below; use the domain guide for assumptions and staged integration.
@@ -57,6 +68,12 @@ export interface PrintJpegInput {
57
68
  * carries 72/1 with ResolutionUnit = 2; that is the standard's unknown-resolution marker, not a print size.
58
69
  */
59
70
  pixelsPerInch?:number;
71
+ /**
72
+ * Optional opt-in source pixel limit for large images: an integer from 1 to `PRINT_JPEG_LIMITS.ceilingPixels`.
73
+ * Default `PRINT_JPEG_LIMITS.maximumPixels` (24 000 000). When given it is recorded in the XMP export plan, like the
74
+ * other admission budgets; the image data are unchanged.
75
+ */
76
+ maximumPixels?:number;
60
77
  }
61
78
  ```
62
79
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photivra/engine",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "private": false,
5
5
  "description": "Scientific TypeScript engine for camera optics, exposure, focus, motion, sensor sampling, diffraction, and digital imaging calculations.",
6
6
  "type": "module",