Add JPEG XL export with a lossless option

Export now offers JPEG XL (8-bit sRGB) next to JPEG, PNG, WebP and 16-bit
TIFF, encoded on-device by libjxl compiled to WebAssembly so the export stays
offline. The codec loads only when a JXL is chosen, the quality slider applies
to the lossy mode, and a lossless switch disables it. The user guide and
changelog describe the format and its current limits (no ICC or XMP yet).

Also adds SECURITY-AUDIT.md with the dependency scan and the review of the
server's trust boundaries.
This commit is contained in:
2026-12-01 14:43:29 +00:00
parent 8b309d9cad
commit 3759b47bc6
13 changed files with 309 additions and 8 deletions
+8
View File
@@ -1,6 +1,8 @@
import { describe, expect, it } from 'vitest';
import { outputSize } from '../gl/renderer';
import { defaultEdits } from './edits';
import { buildFileName, DEFAULT_EXPORT } from './export';
import type { PhotoRecord } from '../types';
describe('export output dimensions', () => {
it('matches the source for an uncropped image', () => {
@@ -19,6 +21,12 @@ describe('export output dimensions', () => {
expect(outputSize(edits, 4000, 3000)).toEqual({ w: 4950, h: 4950 });
});
it('writes the JPEG XL extension for a JXL export', () => {
const photo = { name: 'DSCF1234.RAF', addedAt: Date.now() } as PhotoRecord;
const name = buildFileName('{name}', photo, 0, { ...DEFAULT_EXPORT, format: 'jxl' });
expect(name).toBe('DSCF1234.jxl');
});
it('applies the crop after the rotated frame is calculated', () => {
const edits = defaultEdits();
edits.crop.angle = 45;