{"id":25824244,"url":"https://github.com/fuelsoft/viewer","last_synced_at":"2025-08-03T23:05:31.848Z","repository":{"id":194710882,"uuid":"244820122","full_name":"fuelsoft/viewer","owner":"fuelsoft","description":"Load and display image files","archived":false,"fork":false,"pushed_at":"2020-12-09T07:11:11.000Z","size":327,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-09-14T20:38:01.312Z","etag":null,"topics":["cpp","giflib","libheif","sdl2","sdl2-image"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuelsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-03-04T05:59:53.000Z","updated_at":"2023-09-14T20:38:05.401Z","dependencies_parsed_at":"2023-09-14T21:01:28.088Z","dependency_job_id":null,"html_url":"https://github.com/fuelsoft/viewer","commit_stats":null,"previous_names":["fuelsoft/viewer"],"tags_count":10,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelsoft%2Fviewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelsoft%2Fviewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelsoft%2Fviewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelsoft%2Fviewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuelsoft","download_url":"https://codeload.github.com/fuelsoft/viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241150842,"owners_count":19918373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","giflib","libheif","sdl2","sdl2-image"],"created_at":"2025-02-28T12:38:28.196Z","updated_at":"2025-02-28T12:38:28.846Z","avatar_url":"https://github.com/fuelsoft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# viewer\nLoad and display image files\n\n## What is this?\nI got so tired of Windows Photo Viewer misbehaving that I decided to write a clone.\n\nThings WPV does that drove me to insanity:\n* No support for animated GIFs.\n    * I had to resort to opening GIFs in Internet Explorer, truly a cursed experience.\n    * As of version 0.3.X, animated GIFs are nearly fully supported.\n* \"Windows Photo Viewer can't display this picture because there might not be enough memory available on your computer\"\n    * Let me assure you, this is not correct.\n    * Afflicted photos open correctly in Photoshop, web browsers, etc. It's just WPV that has a problem.\n* Very low FPS and bad screen tearing with no warning when zooming or when panning while zoomed in.\n    * Really annoying, and there's no good reason for it.\n\nHow hard could it be to write a replacement, right?\n\nThings *Viewer* can do:\n* Display many common image formats.\n* Zoom!\n* Pan!\n* Wow!\n\nAlso, it's GPU accelerated (via SDL's Accelerated Rendering features). There are some trade-offs:\n\n* **PRO:** Ultra low CPU usage **once image is loaded -- this is still a CPU process.** \n* **PRO:** Panning and zooming are very smooth and take advantage of better GPU hardware rendering.\n* **CON:** Startup takes a little longer than WPV due to the conversion of the input image to a GPU texture.\n* **CON:** Image size limited by typically smaller VRAM size compared to RAM - *I have yet to find an image large enough to hit this limit though.*\n\n## Requirements:\nThis project depends on:\n* C++17 for std::filesystem\n* MSYS2 for MingW64 and required libraries\n\nPackages you'll need, as they appear in MSYS:\n* mingw-w64-x86_64-gcc\n* mingw-w64-x86_64-make\n* mingw-w64-x86_64-SDL2\n* mingw-w64-x86_64-SDL2_image\n* mingw-w64-x86_64-giflib\n* mingw-w64-x86_64-libheif\n\n## Building:\nRun `make \u003ctype\u003e` in the Viewer folder where type is either `Debug` or `Release` (defaults to `Release`).\n#### Notes:\n* If your `make.exe` isn't on your PATH, you need to launch it via it's complete path or hard link it into the Viewer directory.\n* You will need to modify the makefile at the marked lines to point to your mingw64 install (for `g++` and `windres`).\n* You will also need to point to the library include and lib folders - they shouldn't require much modification unless MSYS is installed somewhere other than default.\n* These are mostly just the build commands as CodeBlocks runs them - they may not always be up to date enough to build the project without modification.\n\n## Usage:\nFirst, ensure that the executable has all the `.dll` files available to it. There are a number you need:\n* `SDL2`, `SDL2_image` \u0026 all the related image `.dll`s (including `zlib`)\n* `libaom`, `libde265`, `libheif`, `libx265` for HEIF files\n* `libgcc_s_seh`, `libstdc++`, `libwinpthread` for basic program functions\n\nThen call the program by either dragging an image onto Viewer.exe or by running `Viewer.exe \u003cfilename\u003e` in a terminal.\n\nYou can also set Viewer as the default program for some image formats if you want to commit to it.\n### Controls:\n\n##### Mouse:\n\n|CONTROL|FUNCTION|NOTES|\n|:-----:|:---:|:---:|\n|SCROLL UP|Increase zoom|-|\n|SCROLL DOWN|Decrease zoom|-|\n|LEFT CLICK|Pan image|Must be held while dragging.|\n|MIDDLE CLICK|Reset zoom and pan|This is usually a scroll wheel click.|\n|MOUSE *X1*|Previous image|If the mouse is equipped with a *back* button.|\n|MOUSE *X2*|Next image|If the mouse is equipped with a *forward* button.|\n\n##### Keyboard:\n\n|SYMBOL|CONTROL|FUNCTION|NOTES|\n|:---:|:---:|:---:|:---:|\n|+|PLUS|Increase zoom|For keyboards without keypad, use equals (`=`).|\n|-|MINUS|Decrease zoom|-|\n|0|ZERO|Reset zoom and pan|Zero, not the letter O.|\n|ESC|ESCAPE|Close program|Identical to window *close* button.|\n|\u003c\\-|LEFT ARROW|Previous image|-|\n|\\-\u003e|RIGHT ARROW|Next image|-|\n|\\|\u003c\\-\u003e\\||TAB|Toggle light theme|-|\n|␣|SPACEBAR|Play/Pause animation|Only applicable to animated images.|\n|DEL|DELETE|Delete image|**Permanent!** This will **not** go to Recycle Bin!|\n|F1|F1|View version info|Probably not useful to you if you're reading this.|\n|F2|F2|View file info|Display Windows Explorer's *Properties* window for the image.|\n|F3|F3|Containing folder|Launches Windows Explorer to the image's parent folder.|\n|F5|F5|Refresh|Reload the current image.|\n\n### Supported formats (by library):\n\n#### SDL:\n* JP(E)G\n* PNG\n* BMP\n* TIF(F)\n* TGA\n\n#### GIFLIB:\n* GIF\n\n#### LIBHEIF:\n* HEIC\n* HEIF\n\n### Notes:\n* Some file types can contain multiple resolutions/variations of an image (ICO, CUR, ...). SDL_image [documentation][1] states that \"for files with multiple images, the first one found with the highest color count is chosen.\"\n* Window size and position are stored in `settings.cfg` in the program folder. If this becomes broken somehow (window appears off-screen, etc.) it is safe to delete this file to restore defaults.\n* Setting up a version of GCC new enough to support C++17 is a really bad time on Windows and unless you really need to build from source, I highly recommend you use one of the builds. Otherwise, I'll direct you to [MSYS2](https://www.msys2.org/)'s homepage.\n\n### TODO:\n* Add key to set zoom to 1:1 pixel ratio\n* Zoom on mouse instead of window center\n* Stop image from being moved off-screen\n* Possible **minimal** RAW support\n\n### Known Problems:\n* ICO: Files stored as \"NEW PNG\" type do not load with SDL_image\n* ICO: Files with partially transparent pixels do not render correctly\n* ALL: Images loaded from RO-type media (cell phones, cameras) are copied to a temp folder by Windows before being loaded. \nThis breaks in-folder navigation. It's unclear to me how WPV works around this.\n* ALL: Images with UTF-8 characters anywhere in the path are broken - this is because of the conversion from wchar string to char string done to accommodate SDL_Image. I can't find anything online about how to work around this.\n\n[1]: https://www.libsdl.org/projects/SDL_image/docs/SDL_image.pdf#page=21\u0026zoom=auto,-205,720\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuelsoft%2Fviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuelsoft%2Fviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuelsoft%2Fviewer/lists"}