GithubHelp home page GithubHelp logo

woelper / oculante Goto Github PK

View Code? Open in Web Editor NEW
711.0 7.0 28.0 109.19 MB

A fast and simple image viewer / editor for many opering systems

Home Page: https://github.com/woelper/oculante

License: MIT License

Rust 98.99% Shell 0.95% Batchfile 0.05%
image viewer dds hdr image-viewer psd png exr rust jpg

oculante's Introduction

Oculante

A no-nonsense hardware-accelerated image viewer

Oculante's vision is to be a fast, unobtrusive, portable image viewer with wide image format support, offering image analysis and basic editing tools.

  • Free of charge, bloat-free, ad-free, privacy-respecting open source application
  • Fast opening of images, fast startup
  • Available for Win, Mac, Linux and NetBSD
  • Supports a wide range of images and SVG
  • Caches images for faster reloading
  • Can display unassociated channels correctly (If your image uses alpha and color channels to encode data in a special way)
  • Lets you pick pixels, display location and color values
  • Offers basic nondestructive editing: Crop, resize, paint, contrast, HSV, rotate, blur, noise, ...
  • SIMD-accelerated image editing

OSX NetBSD Ubuntu Check Windows ARM

GitHub all releases Crates.io

Screenshot

Flipbook

With configurable caching, Oculante can quickly step through image sequences: Screenshot

Inspection

Get info about pixel values and position, with precise picking: Screenshot

Network

Raw image data can be sent to Oculante and will be loaded if possible, regardless of format. Streams of images will be played as a video. You can send images from cameras or headless systems such as a Raspberry Pi for example. Screenshot

Correct color channel display:

Images may contain color information that is masked by the alpha channel. Although it is present you will not see it since usually RGB values are multiplied with the A channel when displayed. Oculante allows you to inspect all channels individually and see color data without transparency applied. Screenshot

Installation

Oculante needs no installation, as it is just one executable. Just download it for your system from the releases tab (https://github.com/woelper/oculante/releases). In order to open images you can configure your system to open your desired image formats with oculante, drag them onto the executable or into the window. Right now the executables are roughly 20MB, as the default is to statically link dependencies. Minimal versions with less image formats are provided for older computers/tiny systems. Packages for Arm linux are also built. Please open an issue if you want your operating system of choice supported.

On NetBSD, a pre-compiled binary is available through the native package manager. To install it, simply run

pkgin install oculante

Features

Image format support:

  • bmp
  • gif (animation support and correct timing)
  • hdr, tonemapped
  • ico
  • jpeg
  • png
  • pnm
  • tga
  • jxl (JPEG XL, via jxl-oxide)
  • avif
  • tiff (via tiff with additional float/half support)
  • webp (via libwebp-sys - image had very limited format support)
  • farbfeld
  • DDS (DXT1-5, via dds-rs)
  • psd (via psd)
  • svg (via resvg)
  • exr (via exr-rs), tonemapped
  • RAW (via quickraw - nef, cr2, dng, mos, erf, raf, arw, 3fr, ari, srf, sr2, braw, r3d, nrw, raw). Since raw is a complex field without true standards, not all camera models are supported.
  • ppm
  • HEIC/HEIF (via libheif-rs). Enabled on Windows builds, but optional dependency on MacOS and Linux - available behind heif flag.
  • qoi

Platform support:

  • Linux
  • Mac
  • Windows
  • NetBSD

Misc features

  • Image info (i) (pixel position, color info)
  • Threaded image loading
  • Fit image to view
  • Window can be configured to be always on top - helpful to keep image as reference
  • Low cpu usage
  • Non-destructive painting and operator stack - edit very large images interactively by scaling them down first, then deleting the downscale operator once you want to export.
  • Metafile support: Edit stack can be saved into a metafile which will be auto-loaded and applied when loading the original.
  • Pretty fast startup / loading time
  • Configurable image caching (Select how many images to keep in memory)
  • Display unassociated / unpremultiplied alpha (u)
  • Lossless JPEG editing: Crop, rotate, mirror without recompressing data
  • Light/Dark theme and follow system theme mode
  • Network listen mode: Start with oculante -l port and oculante will switch to receive mode. You can then pipe raw image data to that port, for example using nc localhost 8888 < image.jpg. Image types will be auto-detected. If you pipe image sequences, these will be played at about 30 fps so you can pipe videos to it. This can be useful to visualize images from a headless system.
  • EXIF support: Load metadata if present
  • Load files from stdin: pipe your data with cat image | oculante -s

Misc examples:

EXIF display

Screenshot

Extract a signature

signature example

Roadmap:

  • Image loading time is still worse than feh or xv This is now very close, in particular after switching to turbojpeg
  • Tests and benchmarks
  • Image rotation (and read EXIF for that)
  • Investigate PVR / ETC support
  • Brighness/gamma adjust for HDR
  • SVG support
  • Custom display for images with unassociated channels
  • EXR support
  • Read next image(s) in dir and advance to them

Privacy pledge

Oculante does in no way collect or send anonymous or non-anonynmous user data or statistics. Oculante is and will remain free and open source. There will never be ads. There are only two instances where oculante interacts with the network, and both never happen without being triggered by the user:

  • Updating the application (must be triggered manually from settings)
  • Listening for incoming images on a custom port (must be set on command line)

In addition, oculante saves some settings locally, for example:

  • UI accent color
  • Keybindings
  • Vsync preferences
  • Keep view offset/scale
  • Whether the directory index bar is displayed
  • Recent files

Attribution

Test / benchmark pictures:

https://unsplash.com/@mohsen_karimi

https://unsplash.com/@frstvisuals

License

This project is MIT licensed. This project contains GPL-licensed code, such as the LUTs in res/LUT. As a result, the source code of this project is publically available to comply with the GPL. Authors who wish to use this project without publishing source code are responsible of removing any code and its references that require source code access.

Building

Linux:

sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev libasound2-dev nasm cmake

Win: Install Nasm from https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/

Mac brew install nasm

Cargo Features

If you disable turbo (on by default), the turbojpeg library will not be used to open jpeg images. You won't need Nasm to be installed. The feature file_open will enable/disable a file open dialog. This pulls in additional dependencies and is enabled by default.

Shortcuts:

mouse wheel = zoom

left mouse,middle mouse = pan

ctrl + mouse wheel = prev/next image in folder

Right mouse pick color from image (in paint mode)

T = AlwaysOnTop

F = Fullscreen

I = InfoMode

E = EditMode

Right = NextImage

Home = FirstImage

End = LastImage

Left = PreviousImage

R = RedChannel

G = GreenChannel

B = BlueChannel

A = AlphaChannel

U = RGBChannel

C = RGBAChannel

V = ResetView

Minus = ZoomOut

Equals = ZoomIn

Key1 = ZoomActualSize

Key2 = ZoomDouble

Key3 = ZoomThree

Key4 = ZoomFour

Key5 = ZoomFive

LShift + C = CompareNext

LShift + Left = PanLeft

LShift + Right = PanRight

LShift + Up = PanUp

LShift + Down = PanDown

Delete = DeleteFile

RBracket = LosslessRotateRight

LBracket = LosslessRotateLeft

LControl + C = Copy

LControl + V = Paste

LControl + O = Browse

Q = Quit

Z = ZenMode

oculante's People

Contributors

0323pin avatar adhalianna avatar aligorith avatar dependabot[bot] avatar diegostafa avatar icesentry avatar imgbotapp avatar quackdoc avatar woelper 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  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  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  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  avatar  avatar

oculante's Issues

Menu option to show view options.

View menu that have the different view modes in it (that are now only documented in the readme), they should also display which hotkey triggers when viewing an image.

Replace gif support with image

Use image's own gif support for decoding sequences.

(thanks u/kennethuil)
AnimationDecoder provides into_frames, which returns an iterator over Frames, each of which provides into_buffer to turn the frame into an RgbaImage.

Timing in milliseconds is now provided by frame.delay().numer_denom_ms(). This represents the time between this frame and the previous frame.

https://docs.rs/image/0.23.14/image/struct.Frames.html#method.collect_frames
https://docs.rs/image/0.23.14/image/struct.Frame.html

Wrong version tag on 0.6.6 release

Hi,

Merged 0.6.6 yesterday, https://mail-index.netbsd.org/pkgsrc-changes/2022/09/02/msg259873.html
Then, I saw that version 0.6.5 was displayed on my bar when the application was in use.

Just pulled the release tarball on my Linux machine to check.

[Sat Sep 03 12:54] pin@muslbox ~/Git$ tar -xf oculante-0.6.6.tar.gz
[Sat Sep 03 12:55] pin@muslbox ~/Git$ cd oculante-0.6.6
[Sat Sep 03 12:55] pin@muslbox ~/Git/oculante-0.6.6$ cat Cargo.toml | grep version
version = "0.6.5"

Cargo.toml and Cargo.lock do indeed still use 0.6.5

Regards

Switch to turbojpeg for jpeg images

If you care about performance, you should switch to turbojpeg, which is magnitudes faster than the image crate when it comes to jpeg encode/decode. In a past project that I was developing, I was even able to decode a stream of jpeg images at 100 frames per second (20 fps with the image crate). There are already good Rust bindings here: https://crates.io/crates/turbojpeg

Investigate resvg support

Can svg be used instead of resvg? This could be beneficial as it's a tiny and rather safe library.

Always on top mode

For displaying reference images, it could be useful to make the window stay in foreground.

Strip binary

Binary should be auto-stripped on CI jobs for Linux and Mac.

Flickering after opening and closing alpha tools

Hi,

I've just updated our package to 0.6.16
Had to build it with --no-default-features, as we internally still default to jpeg instead of libjpeg-turbo and these two can not co-exist. Is either one or the other.

I don't know if this could be somewhat related but, I think I've hit a bug.
When expanding the alpha tools in the info section of the GUI and then closing causes flickering of the Info field.

Propagate image opening errors

There is currently insufficient communication if something (and what) went wrong when loading an image fails. The standard message channel could be used.

zoom

Would it be possible to add an alternative to zoom in (+) and out (-) with these keys?
Mouse wheel is not very useful when there's no mouse ๐Ÿ˜„

Oculante on NetBSD

Hi,

After some minor hick-ups (it needs a couple of external dependencies to build, namely openssl, pkgconf and libX11), I've managed to build and create a native NetBSD package for oculante ๐Ÿ˜„

2022-08-21-091037_1366x768_scrot

I'll import the package into our repositories in a couple of days, want to do some testing first to see if something is missing. But, a few thoughts, already now.
(1) Would be nice to rename 'logo' in the res directory to something more specific. I would like to install the icon into the systems apps directory but, I'm afraid it may be overwritten (or overwrite) by other packages if they also have an icon named 'logo'.

(2) You are most probably already aware of this but, leaving the build warning here for reference anyway,

warning: unused imports: `Gaussian`, `Lanczos3`
 --> src/ui.rs:5:28
  |
5 |     imageops::FilterType::{Gaussian, Lanczos3},
  |                            ^^^^^^^^  ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unreachable pattern
  --> src/image_editing.rs:72:13
   |
72 |             _ => write!(f, "Not implemented Display"),
   |             ^
   |
   = note: `#[warn(unreachable_patterns)]` on by default

warning: variable does not need to be mutable
  --> src/main.rs:45:9
   |
45 |     let mut window_config = WindowConfig::new()
   |         ----^^^^^^^^^^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

(3) When launching oculante from the terminal, I get the following Error initializing logs: attempted to set a logger after the logging system was already initialized but, the application launches and works just fine. Ideas, thoughts on how logs could be initialized?

Thanks for your work on this tool. I'll keep you posted as of when it will become available for users.

Channels setting not true/effective when switching between files

Steps to reproduce:

  1. open image (by default it opens with RGBA setting)
  2. change channels to RGB (it changes the appearance in my case)
  3. change to next image (similar to the first one)
  4. the channels dropdown box stay in RGB (which is good), but the image is displayed still as if in RGBA setting was selected (which is bad)

Add "toast" notification

If possible, add a flexible notification that can be customized to present update notifications or the help text.

Gif loading is unreliable

Sometimes frames from other images keep playing after some gif formats are shown. It might be useful to wrap the image sender in a struct and add Metadata, such as if the image is from an animation or from a filter operator.

Blur?

README.md states,

Offers basic nondestructive editing: Crop, resize, paint, contrast, HSV, rotate, blur, noise, ...

Maybe all these were available on previous version but, on 0.6.5 I see,

2022-08-30-065127_1366x768_scrot

i.e. no blur.

Is this planned or, should the README be updated to reflect current version?

warning: variant `Blur` is never constructed

Hi,

Building 0.6.10 with Rust-1.64.0 (note, NetBSD is still on Rust-1.62.1 but, I've built 1.64.0 locally).

warning: variant `Blur` is never constructed
  --> src/image_editing.rs:52:5
   |
31 | pub enum ImageOperation {
   |          -------------- variant in this enum
...
52 |     Blur(u8),
   |     ^^^^
   |
   = note: `#[warn(dead_code)]` on by default
   = note: `ImageOperation` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

warning: `oculante` (bin "oculante") generated 1 warning

The build is successful, just the warning.

zoom needs to be rate-limited

Trackpads seem to fire zoom events really fast on some OS/machine combinations. Rate-limiting these events or otherwise smoothing out this zooming would be nice.

File path should priorities the tail

Long paths are not fully visible inside the view. When this happens it would be nice if the path trails the front of the path so that we see something like this ...project/build/output/feature/github/image.webp instead of a path like this Home/Jerakin/Documents/repositories/project/build that's cut off by the window.

Reset view on image change

zoom is off when advancing to the next image or receiving a dropped one. The existing reset view function could be used.

Please provide Cargo.lock

Hi,

I'm a NixOS package maintainer, and I am currently packaging oculante for it (WIP). It would help a lot if you could retain the Cargo.lock file. This makes packaging easier for us, or in this case, me. More info can be found here. The argument for the Cargo.lock file is mentioned a bit further down after the cargoHash = lib.fakeHash; example.

Please consider adding it to your repo. Thank you also very much for this fine piece of software, it's awesome. :)

Some animated GIFs crash oculante

I tried to view a bunch of GIFs, but my last file cat_in_headphones.gif crashes the app:

2022-10-25.08-49-30.mp4

This file can be displayed in another program, so why does oculante not work with it?

Problematic file (archived):
cat_in_headphones.zip

System specs:

  • OS: Windows 10 21H1
  • CPU: Intel Core i5-8250U
  • GPU: Intel UHD Graphics 620
  • Oculante version: 0.6.18
P.S. I am thankful to the author of oculante. Now, it is my primary image viewer because of its lightning-fast startup.

Provide a "fit to screen" keybinding

Right now Oculante defaults to showing the images in their actual size, even if they don't fit in the window. This makes it nearly unusable for viewing photos, which are far larger than the typically screen sizes. Allowing to shrink the image if it exceeds the viewport size would be great.

Can not pick colors outside main spectra

Hi,

First of all, thank you for the new release. Awesome progress.
Maybe, you already know this but, I can not seem to be able to pick accent colors that are outside the main spectra.

2022-09-08-090647_1366x768_scrot

I can move the triangle cursor along the color spectra (left and right) but, I can not move the circle cursor up and down to select variations of the main color. I hope that with the screenshot above, it is clear what I'm refering to.

Regards

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.