feat(ui): add cross-platform TIFF-to-PNG preview conversion and set window dimensions (v0.1.13) #73

Merged
gronod merged 1 commits from fix/issue-58-png-previews-and-window-size into development 2026-08-25 10:21:04 +01:00
Owner

Summary

This PR implements cross-platform TIFF-to-PNG preview conversion (resolving #58 and #70) and configures the default & minimum window dimensions (resolving #61).

Closes #58
Closes #70
Closes #61

Changes

  1. Cross-Platform image Dependency (src-tauri/Cargo.toml):
    • Moved image = { version = "0.25", default-features = false, features = ["png", "tiff"] } to common [dependencies].
    • Updated package metadata (authors = ["Gordon"], description = "Modern Printer Profiling UI frontend for ArgyllCMS").
  2. TIFF-to-PNG Preview Command (src-tauri/src/commands.rs, src-tauri/src/lib.rs):
    • Added read_tiff_preview_png(path: String) -> Result<String, String> command.
    • Decodes TIFF from memory, downscales if > 1200px max edge, and encodes to PNG base64.
  3. Frontend Gallery (src/js/printtarg.js):
    • Switched from read_file_base64 to read_tiff_preview_png, passing data:image/png;base64,... to img.src.
  4. Window Dimensions (src-tauri/tauri.conf.json):
    • Set width: 1280, height: 800, minWidth: 1100, minHeight: 700.
  5. Version Bump:
    • Incremented point version 0.1.12 -> 0.1.13 across package.json, src-tauri/Cargo.toml, and src-tauri/tauri.conf.json.
### Summary This PR implements cross-platform TIFF-to-PNG preview conversion (resolving #58 and #70) and configures the default & minimum window dimensions (resolving #61). Closes #58 Closes #70 Closes #61 ### Changes 1. **Cross-Platform `image` Dependency (`src-tauri/Cargo.toml`)**: - Moved `image = { version = "0.25", default-features = false, features = ["png", "tiff"] }` to common `[dependencies]`. - Updated package metadata (`authors = ["Gordon"]`, `description = "Modern Printer Profiling UI frontend for ArgyllCMS"`). 2. **TIFF-to-PNG Preview Command (`src-tauri/src/commands.rs`, `src-tauri/src/lib.rs`)**: - Added `read_tiff_preview_png(path: String) -> Result<String, String>` command. - Decodes TIFF from memory, downscales if > 1200px max edge, and encodes to PNG base64. 3. **Frontend Gallery (`src/js/printtarg.js`)**: - Switched from `read_file_base64` to `read_tiff_preview_png`, passing `data:image/png;base64,...` to `img.src`. 4. **Window Dimensions (`src-tauri/tauri.conf.json`)**: - Set `width: 1280, height: 800`, `minWidth: 1100, minHeight: 700`. 5. **Version Bump**: - Incremented point version `0.1.12` -> `0.1.13` across `package.json`, `src-tauri/Cargo.toml`, and `src-tauri/tauri.conf.json`.
gronod added 1 commit 2026-08-25 10:10:46 +01:00
feat(ui): add cross-platform TIFF-to-PNG preview conversion and set window dimensions (v0.1.13)
Build Windows Packages / Build Windows (pull_request) Successful in 7m30s
Build Linux Packages / Build Linux (pull_request) Successful in 10m27s
d049db9917
gronod merged commit 13a093e19b into development 2026-08-25 10:21:04 +01:00
gronod deleted branch fix/issue-58-png-previews-and-window-size 2026-08-25 10:21:05 +01:00
Sign in to join this conversation.