Skip to content

Conversation

@SergeiVorobyov
Copy link

@SergeiVorobyov SergeiVorobyov commented May 20, 2025

Lepton Image Format Support

  • Added support for the Dropbox Lepton image format for files with the .lep extension.
  • Unlike the changes in PR #178, this implementation uses the library from the lepton_jpeg_rust project to decode Lepton files directly into memory, which are then passed to the internal JPEG encoder. This approach significantly reduces encoding time and avoids using temporary files during intermediate steps.

Given that the lepton_jpeg_rust project is well-maintained and actively developed, the encoding quality and performance are excellent. Decoding overhead is minimal, thanks to the AVX2-optimized version of the library, which JPEGView automatically selects if the processor supports the AVX2 instruction set; otherwise, it falls back to the generic version.

Note on Dependency

JPEGView does not statically link to the lepton_jpeg_rust libraries. Instead, it loads one of them dynamically when the first Lepton image is opened. By default, the following library names are used:

  • lepton_jpeg.dll – for generic CPUs
  • lepton_jpeg_avx2.dll – for AVX2-capable processors

These names are configurable via the LeptonLibName key in JPEGView’s INI file and can be modified if needed.

@SergeiVorobyov SergeiVorobyov marked this pull request as draft May 20, 2025 13:27
@SergeiVorobyov SergeiVorobyov marked this pull request as ready for review May 20, 2025 14:33
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.

1 participant