GithubHelp home page GithubHelp logo

openimageviewer / openimageviewer Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 6.0 2.22 MB

Open image viewer is a hardware accelerated open code c++20 compliant cross platform 'C' library and application for viewing and manipulating images.

License: Other

C++ 87.42% C 7.34% C# 1.21% Batchfile 0.90% ShaderLab 1.29% GLSL 0.83% CMake 1.00%
cpp directx directx-11 opengl

openimageviewer's Introduction

Open Image Viewer

Codacy Badge Windows MSVC build

Open Image Viewer is a hardware accelerated blazingly fast open code c++20 compliant cross-platform application for accurately viewing and analyzing image files.

It provides accurate representation of the image being viewed, unlike the vast majority of the current viewers that shows the monitor color space data.

Emphasis on ergonomics and performance is thoroughly weighed to suit every type of user, the starting novice or the hardcore power user.

Currenlty there's virtually no GUI, keyboard key bindings is used for fast workflow, press F1 to list all keybindings.

For more information visit our website at: www.openimageviewer.com

A Word from the author
Highlights and features

Selection rect demonstration with Open Image Viewer

Build your copy from source / Start developing

Instructions

  1. Clone the repository and update the submodules recursivly.
  2. Use CMake to generate project files or open the root CMake file in visual studio as a CMake project.
  3. Compile and run.

Notes

  • PNG codec is disabled by deafult due to ci/cd issues
  • FreeImage codec is supplied in the official releases as a fallback but disabled by deafult due to its low performance, see below how to build the project with FreeImage
  • 64 bit is only officialy supported, though last checked 32 bit compiles and runs fluently

Windows

Windows requirements
  • Windows 7/8/8.1/10/11
  • Microsoft build tools 2022 or higher
When using Windows 7 SP1, make sure the following are installed

Linux

Linux requirements

coming soon ...

MacOS

MacOS requirements

coming soon ...

Extra Codec Library dependecies (optional)

Name Link
CodecFreeImage http://freeimage.sourceforge.net/

License

OIV uses the OpenImageViewer License license.

openimageviewer's People

Contributors

randallflagg avatar thenicker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openimageviewer's Issues

Extend the frame limiter capabilities

Currently the frame limiter is doing its job in keeping framerates at or below the monitor frequency.
But sometimes on a weak GPUs when using 4K or 8K monitors, the PC can't keep up with rendering.
That makes the software non-interactive, like playing a game in 10 FPS.

Suggestion:

Extend the frame limiter to limit frame rates according to the moving average of the render time or any other suitable technique.

Also add a frame limiter mode two configuration entries.

  1. Frame limiter max FPS mode
  • No Limit - Frame rates are not capped, may reduce perceived latency on low frequency monitors.
  • Monitor frequency (default) - Maximum FPS would match the currently active monitor frequency.
  • Custom - set maximum frame rate to a specific value. e.g. 30 FPS
  1. Frame limiter dynamic capping (this suggestion)
  • Off - Maximum frame rates are according to the Frame limiter max FPS mode above
  • On - Maximum frame rates are according to the Frame limiter max FPS mode above but may be capped on slow GPUs.

Add an error message when a file can't be displayed

When trying to open an unsupported file nothing happens.

Steps to reproduce:

  1. Open an unsupported file(e.g. JSON file) from "file explorer" in Windows using "Open With"

Expected Behavior:
An error message is shown

Actual Behavior:
Nothing happens

Doesn't work on Windows 7 SP1

Both the provided binary file and the successfully built CMake project failed to run. Error: The program can't start because api-ms-win-shcore-scaling-l1-1-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

OS: Windows 7 SP1 64-bit
Built using Microsoft Visual Studio Community 2019

UPD. Shcore is not available on Windows 7, and Windows 8.1+ is required: https://docs.microsoft.com/en-us/windows/win32/api/shellscalingapi/nf-shellscalingapi-getdpiformonitor
You should probably update the requirements: https://github.com/OpenImageViewer/OpenImageViewer#requirements

Add single key shortcuts to change the size of the window

e.g.

key '1' will change the window size to small.
key '2' will change the window size to medium.
etc...

Possible implementation:
Create a general command for changing the window size in percentage relative to the active monitor and add a customizable key bindings in the settings file.

note: the largest axis (vertical /horizontal) should be taken into consideration when determining the new window size

Create an Open Image Viewer forum

Looking for a volunteer to taking the wheel to establish, host and maintain a forum for the benefit of the project.
The forum will serve developers and users.

Our current inclination goes with NodeBB.

Add option to read ahead images in the current folder

Read ahead images in the current folder and upload them to the GPU for a better experience.

Since in Open Image Viewer we have full control over the image generation pipeline, switching an image no matter how big it is would execute in less than a millisecond, or in practice immediately at the next presented frame.

Add lister plugin

Add support for Lister plugin for total commander and double commander

Redundant redraw on initial image load

When the first image is being loaded by passing its path via the command line there's an initial redraw, then the image is being fitted to screen and centered (default behavior) follow by a second redraw.

The first redraw in this case is redundant.

Add geolocation support using configurable command

Add the option to open an external application / website or other using a user configurable command to open the coordinates of where the image took place when geolocation metadata is available.

e.g. open google maps in the location where the photo took place

Unsupported TIFF file

The file attached shows as not supported:
https://www.leadtools.com/support/forum/resource.ashx?a=545&b=1

The attached TIFF file contains 11 pages, each of which is encoded differently from all the other pages. The pages are, in order:
1- Uncompressed RGB
2- Uncompressed CMYK
3- JPEG 2000 compression
4- JPEG 4:1:1 compression
5- JBIG compression
6- RLE Packbits compression
7- CMYK with RLE Packbits compression
8- YCC with RLE Packbits compression
9- LZW compression
10- CCITT Group 4 compression
11- CCITT Group 3 2-D compression

Fix warnings in the project and its sub-projects

Recommended flags to use:

MSVC

use the compiler flag/W4

CLang

Enable the following warnings groups: -Wextra -Wpedantic -Wall -Wpessimizing-move

Disable the following specific warnings: -Wno-c++98-compat -Wno-c++11-compat -Wno-c++14-compat -Wno-c++98-compat-pedantic -Wno-reserved-id-macro -Wno-newline-eof -Wno-global-constructors -Wno-exit-time-destructors -Wno-float-equal -Wno-covered-switch-default -Wno-unreachable-code-break

Specific false positive warnings should be disabled locally using the precompiler macros

Add option to snap selection rectangle to pixel grid

The selection rectangle is currently in a "free flow" mode and can be placed between pixels.
it would be logical and more convenient to snap the selection area to a discrete pixel or more precisely to a discrete pixel when zoom is above 100% and to a discrete texel when zoom is less than 100%

Add multi-line user notification messages

User notification messages are being displayed in the upper left corner of the window.
When a new message arrived it replaces the currently displayed message and in many times there is not enough time to read the message before it being replaced.

The proposed solution is to push messages downwards instead of replacing them.

One point to consider is to not replace similar messages, otherwise the window will be flooded with messages and message notification would lose its purpose

Improve text rendering

Text rendering is currently using standard anti-aliasing.

Suggestion
Integrate the subpixel antialiasing capabilities of FreeType

Source is incomplete / cannot build

  • Source assumes the existence of LLUtils, which is not included.
  • oivlib\oiv\Source\ImageUtil.h can't find Image.h, or ExoticNumbers*.h*
  • CMake files assume that easyexif, FreeTypeWrapper, and ImageCode folders are all populated. I had to edit oivlib\oiv\CMakeLists.txt heavily to get CMake to be happy.

Can't Build

So many build / readme problems.

  • requires GLEW, which was not mentioned
  • the codecs "buildconfig.h" has been reworked, readme not updated
  • git clone "OpenImageViewer", not "oiv"
  • u8string - ambiguous symbol [possibly requires FreeType?]
  • undefined class std::experimental::filesystem::v1::path
  • the command line is "msbuild oiv.sln", and the full path isn't required if you use the
    "developer command prompt for visual studio"

So far, but I'm giving up here.

Windows halts when changing to full-screen

The system halts when changing to full-screen not on the primary monitor.
HARD-RESET seems the only way for getting back to a working state.

How to reproduce:

  1. Drag the window (no need to load an image) to one of the secondary monitors.
  2. Press and hold Alt-Enter.

This will rapidly toggle full-screen mode and will halt the system in a very short time.

After preliminary debugging, these are my findings:

It appears to be a vulnerability in the DWM (desktop window manager) when using DXGI_SWAP_EFFECT_FLIP_DISCARD.

The bug was reproduced with the following setup:

OS:

Windows 10 2004 19041.388

Active GPUs

Primary: Geforce GTX660 TI
Secondary: Intel HD Graphics 4000

Active monitors - (all connected to the primary GPU)

Monitor 1: Display Port 2560x1440x59.94Hz (secondary monitor)
Monitor 2: DVI dual link 1920x1080x144Hz (primary monitor)
Monitor 3: HDMI 1280x1024x60Hz(secondary monitor)

  • When changing the frequency of the primary monitor to 60HZ the Bug doesn't reproduce

Add the ability to change settings via GUI

Currently to change settings one needs to edit the json file manually.

Suggestion
Add an optional pluginable GUI subsystem for changing settings.
Since it's not an integral part of the program, writing it in C++ is not mandatory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.