-
Notifications
You must be signed in to change notification settings - Fork 1
Fix some bugs #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix some bugs #34
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e244b14
Fix some bugs suggested by CodeRabbit
AlanRockefeller 777fe28
Normalize line endings (LF)
AlanRockefeller a5e0e31
Apply CRLF->LF clean filter
AlanRockefeller 89689cf
Ensure CRLF clean filter applies to text patterns
AlanRockefeller 4d4d9bc
Apply CRLF->LF clean filter to text files
AlanRockefeller f21a884
fix(tests): remove invalid Path.suffix writes; fix RAW-mode test harn…
AlanRockefeller 02487a2
fix(imaging): prevent double EXIF rotation on cached previews
AlanRockefeller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Strip CRLF on commit (working tree may still be CRLF on Windows mounts) | ||
| * text=auto eol=lf filter=crlf | ||
|
|
||
|
|
||
| # Explicitly treat these as text (and also run the CRLF->LF clean filter) | ||
| *.py text eol=lf filter=crlf | ||
| *.sh text eol=lf filter=crlf | ||
| *.bash text eol=lf filter=crlf | ||
| *.fish text eol=lf filter=crlf | ||
| *.qml text eol=lf filter=crlf | ||
| *.md text eol=lf filter=crlf | ||
| *.txt text eol=lf filter=crlf | ||
| *.yml text eol=lf filter=crlf | ||
| *.yaml text eol=lf filter=crlf | ||
| *.json text eol=lf filter=crlf | ||
| *.toml text eol=lf filter=crlf | ||
| *.ini text eol=lf filter=crlf | ||
| *.cfg text eol=lf filter=crlf | ||
|
|
||
|
|
||
| # Keep binaries untouched (no eol conversions) | ||
| *.png binary | ||
| *.jpg binary | ||
| *.jpeg binary | ||
| *.tif binary | ||
| *.tiff binary | ||
| *.webp binary | ||
| *.gif binary | ||
| *.ico binary | ||
| *.pdf binary | ||
| *.zip binary | ||
| *.7z binary | ||
| *.gz binary | ||
| *.bz2 binary | ||
| *.xz binary | ||
| *.whl binary | ||
| *.so binary | ||
| *.dll binary | ||
| *.dylib binary | ||
| *.tiff binary | ||
| *.nef binary | ||
| *.cr2 binary | ||
| *.cr3 binary | ||
| *.arw binary | ||
| *.dng binary | ||
| *.orf binary | ||
| *.rw2 binary | ||
| *.raf binary | ||
| *.heic binary | ||
| *.mp4 binary | ||
| *.mov binary | ||
|
|
||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| recursive-include faststack/qml * | ||
| include LICENSE | ||
| include README.md | ||
| recursive-include faststack/qml * | ||
| include LICENSE | ||
| include README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,101 +1,101 @@ | ||
| # FastStack | ||
| # Version 1.5 - January 1, 2026 | ||
| # By Alan Rockefeller | ||
| Ultra-fast, caching JPG viewer designed for culling and selecting RAW or JPG files for focus stacking and website upload. | ||
| This tool is optimized for speed, using `libjpeg-turbo` for decoding, aggressive prefetching, and byte-aware LRU caches to provide a fluid experience when reviewing thousands of images. | ||
| ## Features | ||
| - **Crop:** Added the ability to crop and rotate images via the cr(O)p hotkey (or right mouse click). It can be a freeform crop, or constrained to several popular aspect ratios. | ||
| - **Zoom & Pan:** Smooth zooming and panning. | ||
| - **Stack Selection:** Group images into stacks (`[`, `]`) and select them for processing (`S`). | ||
| - **Helicon Focus Integration:** Launch Helicon Focus with your selected RAW files with a single keypress (`Enter`). | ||
| - **Instant Navigation:** Sub-10ms next/previous image switching, high performance decoding via `PyTurboJPEG`. | ||
| - **Image Editor:** Built-in editor with exposure, contrast, white balance, sharpness, and more (E key) | ||
| - **Quick Auto White Balance:** Press A to apply auto white balance and save automatically with undo support (Ctrl+Z). For better white balance, load the raw into Photoshop with the P key.- **Photoshop Integration:** Edit current image in Photoshop (P key) - always uses RAW files when available. | ||
| - **Clipboard Support:** Copy image path to clipboard (Ctrl+C) | ||
| - **Image Filtering:** Filter images by filename | ||
| - **Drag & Drop:** Drag images to external applications. Press { and } to batch files to drag & drop multiple images. | ||
| - **Theme Support:** Toggle between light and dark themes | ||
| - **Delete & Undo:** Move images to recycle bin (Delete/Backspace) with undo support (Ctrl+Z) | ||
| - **Has Memory:** Starts where you left off, tells you which images have been edited, stacked and uploaded. | ||
| - **RAW Pairing:** Automatically maps JPGs to their corresponding RAW files (`.CR3`, `.ARW`, `.NEF`, etc.). | ||
| - **Configurable:** Adjust cache sizes, prefetch behavior, and Helicon Focus / Photoshop paths via a settings dialog and a persistent `.ini` file. | ||
| - **Accurate Colors:** Uses monitor ICC profile to display colors correctly. | ||
| - **RGB Histogram:** Pressing H brings up a RGB histogram which is designed to show even a little bit of highlight clipping and updates as you zoom in. | ||
| ## Installation | ||
| ### macOS (Recommended) | ||
| FastStack performs best on Python 3.12 due to PySide6 compatibility. | ||
| 1. **Install Python 3.12 (via Homebrew):** | ||
| ```bash | ||
| brew install python@3.12 | ||
| ``` | ||
| 2. **Create and Activate a Virtual Environment:** | ||
| ```bash | ||
| python3.12 -m venv venv | ||
| source venv/bin/activate | ||
| ``` | ||
| 3. **Install FastStack:** | ||
| ```bash | ||
| # From source directory | ||
| python -m pip install -U pip | ||
| python -m pip install . | ||
| ``` | ||
| *Note: If you encounter issues with `opencv-python` or `PySide6` on newer Python versions (3.13+), please stick to Python 3.12.* | ||
| 4. **Run:** | ||
| ```bash | ||
| faststack | ||
| ``` | ||
| ### Windows / Linux | ||
| ```bash | ||
| python -m venv venv | ||
| # Activate venv (Windows: venv\Scripts\activate, Linux: source venv/bin/activate) | ||
| pip install . | ||
| faststack | ||
| ``` | ||
| ## Keyboard Shortcuts | ||
| - `J` / `Right Arrow`: Next Image | ||
| - `K` / `Left Arrow`: Previous Image | ||
| - `G`: Jump to Image Number | ||
| - `I`: Show EXIF Data | ||
| - `S`: Toggle current image in/out of stack | ||
| - `X`: Remove current image from batch/stack | ||
| - `B`: Toggle current image in/out of batch | ||
| - `[`: Begin new stack group | ||
| - `]`: End current stack group | ||
| - `C`: Clear all stacks | ||
| - `{`: Begin new drag & drop batch | ||
| - `}`: End current drag & drop batch | ||
| - `\`: Clear drag & drop batch | ||
| - `U`: Toggle uploaded flag | ||
| - `Ctrl+E`: Toggle edited flag | ||
| - `Ctrl+S`: Toggle stacked flag | ||
| - `Enter`: Launch Helicon Focus with selected RAWs | ||
| - `P`: Edit in Photoshop (uses RAW file if available) | ||
| - `O` (or Right-Click): Toggle crop mode (Enter to execute, Esc to cancel) | ||
| - `Delete` / `Backspace`: Move image to recycle bin | ||
| - `Ctrl+Z`: Undo last action (delete, auto white balance, or crop) | ||
| - `A`: Quick auto white balance (saves automatically) | ||
| - `Ctrl+Shift+B`: Quick auto white balance (alternate) | ||
| - `L`: Quick auto levels (saves automatically) | ||
| - `E`: Toggle Image Editor | ||
| - `Esc`: Close active dialog, editor, or cancel crop | ||
| - `H`: Toggle histogram window | ||
| - `Ctrl+C`: Copy image path to clipboard | ||
| - `Ctrl+0`: Reset zoom and pan to fit window | ||
| - `Ctrl+1`: Zoom to 100% | ||
| - `Ctrl+2`: Zoom to 200% | ||
| - `Ctrl+3`: Zoom to 300% | ||
| - `Ctrl+4`: Zoom to 400% | ||
| # FastStack | ||
|
|
||
| # Version 1.5 - January 1, 2026 | ||
| # By Alan Rockefeller | ||
|
|
||
| Ultra-fast, caching JPG viewer designed for culling and selecting RAW or JPG files for focus stacking and website upload. | ||
|
|
||
| This tool is optimized for speed, using `libjpeg-turbo` for decoding, aggressive prefetching, and byte-aware LRU caches to provide a fluid experience when reviewing thousands of images. | ||
|
|
||
| ## Features | ||
|
|
||
| - **Crop:** Added the ability to crop and rotate images via the cr(O)p hotkey (or right mouse click). It can be a freeform crop, or constrained to several popular aspect ratios. | ||
| - **Zoom & Pan:** Smooth zooming and panning. | ||
| - **Stack Selection:** Group images into stacks (`[`, `]`) and select them for processing (`S`). | ||
| - **Helicon Focus Integration:** Launch Helicon Focus with your selected RAW files with a single keypress (`Enter`). | ||
| - **Instant Navigation:** Sub-10ms next/previous image switching, high performance decoding via `PyTurboJPEG`. | ||
| - **Image Editor:** Built-in editor with exposure, contrast, white balance, sharpness, and more (E key) | ||
| - **Quick Auto White Balance:** Press A to apply auto white balance and save automatically with undo support (Ctrl+Z). For better white balance, load the raw into Photoshop with the P key.- **Photoshop Integration:** Edit current image in Photoshop (P key) - always uses RAW files when available. | ||
| - **Clipboard Support:** Copy image path to clipboard (Ctrl+C) | ||
| - **Image Filtering:** Filter images by filename | ||
| - **Drag & Drop:** Drag images to external applications. Press { and } to batch files to drag & drop multiple images. | ||
| - **Theme Support:** Toggle between light and dark themes | ||
| - **Delete & Undo:** Move images to recycle bin (Delete/Backspace) with undo support (Ctrl+Z) | ||
| - **Has Memory:** Starts where you left off, tells you which images have been edited, stacked and uploaded. | ||
| - **RAW Pairing:** Automatically maps JPGs to their corresponding RAW files (`.CR3`, `.ARW`, `.NEF`, etc.). | ||
| - **Configurable:** Adjust cache sizes, prefetch behavior, and Helicon Focus / Photoshop paths via a settings dialog and a persistent `.ini` file. | ||
| - **Accurate Colors:** Uses monitor ICC profile to display colors correctly. | ||
| - **RGB Histogram:** Pressing H brings up a RGB histogram which is designed to show even a little bit of highlight clipping and updates as you zoom in. | ||
|
|
||
| ## Installation | ||
|
|
||
| ### macOS (Recommended) | ||
| FastStack performs best on Python 3.12 due to PySide6 compatibility. | ||
|
|
||
| 1. **Install Python 3.12 (via Homebrew):** | ||
| ```bash | ||
| brew install python@3.12 | ||
| ``` | ||
|
|
||
| 2. **Create and Activate a Virtual Environment:** | ||
| ```bash | ||
| python3.12 -m venv venv | ||
| source venv/bin/activate | ||
| ``` | ||
|
|
||
| 3. **Install FastStack:** | ||
| ```bash | ||
| # From source directory | ||
| python -m pip install -U pip | ||
| python -m pip install . | ||
| ``` | ||
| *Note: If you encounter issues with `opencv-python` or `PySide6` on newer Python versions (3.13+), please stick to Python 3.12.* | ||
|
|
||
| 4. **Run:** | ||
| ```bash | ||
| faststack | ||
| ``` | ||
|
|
||
| ### Windows / Linux | ||
| ```bash | ||
| python -m venv venv | ||
| # Activate venv (Windows: venv\Scripts\activate, Linux: source venv/bin/activate) | ||
| pip install . | ||
| faststack | ||
| ``` | ||
|
|
||
| ## Keyboard Shortcuts | ||
|
|
||
| - `J` / `Right Arrow`: Next Image | ||
| - `K` / `Left Arrow`: Previous Image | ||
| - `G`: Jump to Image Number | ||
| - `I`: Show EXIF Data | ||
| - `S`: Toggle current image in/out of stack | ||
| - `X`: Remove current image from batch/stack | ||
| - `B`: Toggle current image in/out of batch | ||
| - `[`: Begin new stack group | ||
| - `]`: End current stack group | ||
| - `C`: Clear all stacks | ||
| - `{`: Begin new drag & drop batch | ||
| - `}`: End current drag & drop batch | ||
| - `\`: Clear drag & drop batch | ||
| - `U`: Toggle uploaded flag | ||
| - `Ctrl+E`: Toggle edited flag | ||
| - `Ctrl+S`: Toggle stacked flag | ||
| - `Enter`: Launch Helicon Focus with selected RAWs | ||
| - `P`: Edit in Photoshop (uses RAW file if available) | ||
| - `O` (or Right-Click): Toggle crop mode (Enter to execute, Esc to cancel) | ||
| - `Delete` / `Backspace`: Move image to recycle bin | ||
| - `Ctrl+Z`: Undo last action (delete, auto white balance, or crop) | ||
| - `A`: Quick auto white balance (saves automatically) | ||
| - `Ctrl+Shift+B`: Quick auto white balance (alternate) | ||
| - `L`: Quick auto levels (saves automatically) | ||
| - `E`: Toggle Image Editor | ||
| - `Esc`: Close active dialog, editor, or cancel crop | ||
| - `H`: Toggle histogram window | ||
| - `Ctrl+C`: Copy image path to clipboard | ||
| - `Ctrl+0`: Reset zoom and pan to fit window | ||
| - `Ctrl+1`: Zoom to 100% | ||
| - `Ctrl+2`: Zoom to 200% | ||
| - `Ctrl+3`: Zoom to 300% | ||
| - `Ctrl+4`: Zoom to 400% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| import numpy as np | ||
| from PIL import Image | ||
| from faststack.imaging.editor import ImageEditor | ||
| def debug_run(): | ||
| editor = ImageEditor() | ||
| w, h = 200, 200 | ||
| arr = np.zeros((h, w, 3), dtype=np.uint8) | ||
| arr[:] = 200 | ||
| arr[0, 0, 0] = 255 | ||
| img = Image.fromarray(arr, 'RGB') | ||
| editor.original_image = img | ||
| editor._preview_image = img | ||
| blacks, whites, p_low, p_high = editor.auto_levels(threshold_percent=0.1) | ||
| print(f"RESULT: p_high={p_high}") | ||
| if __name__ == "__main__": | ||
| debug_run() | ||
|
|
||
| import numpy as np | ||
| from PIL import Image | ||
| from faststack.imaging.editor import ImageEditor | ||
|
|
||
| def debug_run(): | ||
| editor = ImageEditor() | ||
| w, h = 200, 200 | ||
| arr = np.zeros((h, w, 3), dtype=np.uint8) | ||
| arr[:] = 200 | ||
| arr[0, 0, 0] = 255 | ||
|
|
||
| img = Image.fromarray(arr, 'RGB') | ||
| editor.original_image = img | ||
| editor._preview_image = img | ||
|
|
||
| blacks, whites, p_low, p_high = editor.auto_levels(threshold_percent=0.1) | ||
| print(f"RESULT: p_high={p_high}") | ||
|
|
||
| if __name__ == "__main__": | ||
| debug_run() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.