Skip to content

[PB-6834]: add TIFF page decoder and RAW/TIFF preview strategy - #2153

Open
terrerox wants to merge 1 commit into
feature/image-preview-jpeg-scannerfrom
feature/image-preview-tiff-decoder
Open

terrerox wants to merge 1 commit into
feature/image-preview-jpeg-scannerfrom
feature/image-preview-tiff-decoder

Conversation

@terrerox

@terrerox terrerox commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Stacked on #2152

Summary

  • Adds tiffDecoder.ts: decodes the largest displayable TIFF page with utif2 and downsamples it to a preview-sized image.
  • Adds decodeImagePreview.ts: picks embedded-JPEG extraction or TIFF decoding per file extension.
  • Expands the RAW extension list in file-types.ts and exports heicImageExtensions, tiffImageExtensions, rawImageExtensions and convertibleImageExtensions.
  • Adds node unit tests for the decoder and the strategy.
  • Preview is not enabled for these formats yet; that lands in the next stacked branch.

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Decodes the largest displayable TIFF page with utif2 and downsamples
it; picks embedded-JPEG or TIFF decoding per extension; expands the
RAW extension list and exports the extension groups. Preview is not
enabled for these formats yet.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: a96d82d
Status: ✅  Deploy successful!
Preview URL: https://2596b8c7.drive-web.pages.dev
Branch Preview URL: https://feature-image-preview-tiff-d.drive-web.pages.dev

View logs

@sonarqubecloud

Copy link
Copy Markdown

@terrerox terrerox changed the title feat(preview): add TIFF page decoder and RAW/TIFF preview strategy [PB-6834]: add TIFF page decoder and RAW/TIFF preview strategy Sep 14, 2026
@terrerox terrerox self-assigned this Sep 14, 2026
@terrerox
terrerox requested a review from xabg2 September 16, 2026 14:53
Comment on lines +215 to +218
/**
* Image formats browsers cannot render natively. The file viewer converts them
* to a browser-friendly image (JPEG/PNG) before showing the preview.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment. The name of the variable is enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants