An open API service indexing awesome lists of open source software.

https://github.com/2010hcy/lepviewer

LepViewer,Lep(Lepton)查看器,快速预览压缩后的Lep图片
https://github.com/2010hcy/lepviewer

desktop-app javascript lep lepton rust tauri tauri-v2 tauri2 utility windows

Last synced: 23 days ago
JSON representation

LepViewer,Lep(Lepton)查看器,快速预览压缩后的Lep图片

Awesome Lists containing this project

README

          

# LepViewer

[简体中文](./README.md) | [English](./README.EN.md)

Lepton is a lossless JPG compression tool developed by Dropbox that can reduce file sizes by approximately 20% without losing image quality. However, the .lep format is not a universal image format and requires restoration to JPG via Lepton before viewing, which significantly limits its daily use.

LepViewer was created specifically to lower the barrier to entry for using Lepton. It gives .lep files an instant preview experience like ordinary images—no manual decompression is needed; just double-click to view directly, combining efficient compression with convenient browsing.

![Language](https://img.shields.io/badge/language-Rust-orange.svg)

This project is built with Rust and Tauri.

## Page Preview

### LepViewer (Image Viewer)

![Page](./images/软件页面1.png)

![Effect](./images/效果.png)

![Effect 2](./images/效果2.png)

### LepThumb (Windows Thumbnail Preview)

After installing the thumbnail plugin, you can directly see `.lep` file thumbnails in the system, improving browsing experience:

![Thumbnail Preview](./images/缩略图预览效果.png)

Thumbnail generation speed is about 0.25 seconds per image (15MB JPG), with around 50% CPU usage during generation. Because Windows caches thumbnails, it usually only displays slower on the first open; afterwards it uses the cache.

**How to enable thumbnail preview:**
Because the thumbnail feature requires registering a DLL plugin with Windows, please download the appropriate installer from the [Releases page](../../releases) and install it:
* `LepThumb-AVX_Install.exe`: recommended for modern CPUs that support the AVX instruction set.
* `LepThumb_Install.exe`: compatible version for older CPUs.

## Build from Source

[Rust 1.89 or higher](https://www.rust-lang.org/tools/install)

Install dependencies:

```bash
npm install
```

Run in development mode:

```bash
npm run dev
```

Build package (Compatible version):

```bash
npm run build
```

Build package (AVX instruction set):

```bash
npm run build:avx
```

Build DLL:

```bash
cargo build --release
RUSTFLAGS="-C target-feature=+crt-static,+avx2" cargo build --release
```

## Lepton Utility Trio

To make Lepton both compact after compression and previewable like an uncompressed JPG, you can download the following trio:

1. **[TinyLep](https://github.com/2010HCY/TinyLep)**: a batch lossless JPG compression tool that compresses files and folders by drag-and-drop.
2. **LepViewer**: this project, which allows instant preview of `.lep` files like ordinary images by double-clicking, without manual decompression.
3. **LepThumb**: this project, a Windows Explorer thumbnail plugin that lets you preview `.lep` thumbnails directly in folders.

The LepThumb source code is located in the LepThumb folder in this repository.

## Acknowledgements

This project uses Dropbox Lepton. Special thanks to the **Microsoft team** for open-sourcing the Rust port and refactoring of the Lepton tool: [lepton_jpeg_rust](https://github.com/microsoft/lepton_jpeg_rust)

## Appreciate

If these tools are helpful to you, feel free to support:

![PayQrcode](./images/PayQrcode.jpg)

## Changelog
### 1.1.0
- Interaction optimization: Scroll wheel zooming is now centered on the mouse cursor, and quick scaling is centered on the display area.
- Optimized image opening: Images now automatically fit the window size upon opening.
- UI enhancement: The quick zoom component was rewritten using custom DOM for visual consistency.
- Richer info: The bottom status bar now displays the `.lep` file size.
- Export optimization: Improved "Save As" and "Copy" logic to prevent repeated decompression.

![效果1](./images/效果1-1.1.0.png)
![效果2](./images/效果2-1.1.0.png)
![快速缩放组件](./images/快速缩放组件.png)

### 1.0.0
- Basic viewing and zooming functionalities.