A cross-platform image (texture) viewer

Overview

img_maniac

A cross-platform image (texture) viewer

screenshot

demo

Features

  • Drag and drop images: Users can easily add as many images as they want to the main window by simply dragging and dropping them.
  • RGBA channel switching: With the press of a number key (1-4), users can switch between the RGBA channels of all the images they have loaded.
  • Wide range of image formats supported: Img Maniac supports a variety of image formats
    • avif
    • basis
    • bmp
    • dds
    • exr
    • hdr
    • jpeg
    • ktx2
    • png
    • tga
    • tiff
  • Cross-platform compatibility: Img Maniac is designed to work seamlessly on multiple operating systems, including macOS, Linux, and Windows.
  • User-friendly interface: The tool has an intuitive and user-friendly interface that makes it easy for users to manipulate their images.
  • Fast performance: Img Maniac is optimized for fast image processing and can handle large files with ease.
  • Command line invocation: invoke img_maniac ./a.png ./b.bmp ./c.dds and fd -tf ".png" . | xargs path_to_img_maniac

TODO

  • Embed shader code into executable
  • Embed font into executable
  • Auto layout
Comments
  • Building on Linux requires alsa

    Building on Linux requires alsa

    It seems that building that image viewer requires an audio library (Alsa):

    cargo run --release       
    
    error: failed to run custom build command for `alsa-sys v0.3.1`
    
    Caused by:
      process didn't exit successfully: `/tmp/img_maniac/target/release/build/alsa-sys-6f16022a8ae0a3fc/build-script-build` (exit status: 101)
      --- stdout
      cargo:rerun-if-env-changed=ALSA_NO_PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
      cargo:rerun-if-env-changed=HOST_PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG
      cargo:rerun-if-env-changed=ALSA_STATIC
      cargo:rerun-if-env-changed=ALSA_DYNAMIC
      cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
      cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
      cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
      cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
      cargo:rerun-if-env-changed=PKG_CONFIG_PATH
      cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
      cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
      cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
      cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
    
      --- stderr
      thread 'main' panicked at '`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "alsa"` did not exit successfully: exit status: 1
      error: could not find system library 'alsa' required by the 'alsa-sys' crate
    
      --- stderr
      Package alsa was not found in the pkg-config search path.
      Perhaps you should add the directory containing `alsa.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'alsa' found
      ', /home/gsurrel/.cargo/registry/src/github.com-1ecc6299db9ec823/alsa-sys-0.3.1/build.rs:13:18
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    Maybe it's possible to opt-out easily?

    opened by gsurrel 1
  • crash when trying to open large images

    crash when trying to open large images

    Thanks for making this tool! While checking if this could be an image viewer that can handle ridiculous image sizes, I encountered a crash.

    Observation

    When opening an image with dimensions larger than 16384 pixels, it crashes with:

    2023-05-01T05:19:02.512601Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M1 Pro", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
    2023-05-01T05:19:02.694028Z  INFO bevy_winit::system: Creating new window "Image Maniac" (0v0)
    2023-05-01T05:19:02.816696Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 13.3.1 ", kernel: "22.4.0", cpu: "Apple M1 Pro", core_count: "10", memory: "16.0 GiB" }
    2023-05-01T05:20:00.384561Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
    thread 'Compute Task Pool (0)' panicked at 'wgpu error: Validation Error
    
    Caused by:
        In Device::create_texture
        Dimension X value 17160 exceeds the limit of 16384
    
    ', /Users/byron/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/backend/direct.rs:3024:5
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread 'Compute Task Pool (0)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', /Users/byron/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.10.1/src/schedule/executor/multi_threaded.rs:194:60
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /Users/byron/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.1/src/task_pool.rs:376:49
    thread 'Compute Task Pool (0)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', /Users/byron/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.10.1/src/pipelined_rendering.rs:136:45
    thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/byron/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.1/src/task_pool.rs:376:49
    

    Expectation

    It knows its limits and communicates the issue without crashing.

    Reproduction

    This is the image I tried to open the full-size version of this image (https://github.com/Byron/gitoxide/releases/download/v0.16.0/git-100k-scloc.png)

    opened by Byron 4
  • Consider checking `Cargo.toml` back into git

    Consider checking `Cargo.toml` back into git

    Hi! https://github.com/AllenDang/img_maniac/pull/6 for rid of the Cargo.lock file. It's totally up to you, but I've found that having Cargo.lock committed for binary projects has been very useful for stability and debugging. It's recommended by the cargo guide as well: https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries. I'd consider checking it back into git. (@adsick).

    opened by expenses 2
  • libstdc++-6.dll

    libstdc++-6.dll

    win 64 img_maniac.exe run err:

    Code execution could not continue because libstdc++-6.dll could not be found. Reinstalling the program may resolve this issue.

    opened by Frozen1084 1
  • use 2d camera instead of 3d one

    use 2d camera instead of 3d one

    I'm not sure why this crate uses 3d camera, the content is all 2d. Camera 2d has OrthographicProjection component which has scale, it is what you want instead of adjusting z coordinate (unless you actually want images to float in 3d space)

    useful: https://github.com/bevyengine/bevy/issues/2580

    P.S. beware of this issue: https://github.com/bevyengine/bevy/issues/239

    opened by adsick 4
  • Windows build fails to run with Entry Point Not Found

    Windows build fails to run with Entry Point Not Found

    The Windows build won't start on Windows 11 (10.0.22621 N/A Build 22621). An empty terminal opens and an error dialog box opens with the message:

    The procedure entry point _ZSt28__throw_bad_array_new_lengthv could not be located in the dynamic link library C:\...\img_maniac_win_x64\img_maniac.exe

    According to this SO question, it's a libstdc++ issue. Seems like the compiler trying to statically link it, but not actually emitting the symbol.

    opened by brookst 3
Owner
Allen Dang
Allen Dang
An opinionated, monolithic template for Bevy with cross-platform CI/CD, native + WASM launchers, and managed cross-platform deployment.

??️ Bevy Shell - Template An opinionated, monolithic template for Bevy with cross-platform CI/CD, native + WASM launchers, and managed cross-platform

Kurbos 218 Dec 30, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.8k Jan 9, 2023
Cross-platform game engine in Rust.

Cross-platform game engine in Rust.

Fedor Logachev 1.9k Jan 3, 2023
IDE for cross-platform software development

Diversity Space IDE for cross-platform software development | 日本語 | English | Русский | READMEの英語版とロシア語版はDeepl翻訳を使用して翻訳されています Английская и русская вер

latteS 0 Feb 23, 2022
A cross platform (wasm included) networking library!

bootleg_networking A cross platform (wasm included) networking library! A networking plugin for the Bevy game engine that wraps around bevy_networking

William Batista 51 Jan 1, 2023
This is a cross-platform tool to historicize different branches/depots/manifests and generating pseudocode for it to compare different game updates

CSHP This is a cross-platform tool to historicize different branches/depots/manifests and generating pseudocode for it to compare different game updat

raizo 6 Jan 28, 2022
Neutral cross-platform Rust game template

Rust Game Template Neutral cross-platform Rust game template. Build tool This project uses cargo-make task runner. It's required to build the project.

null 0 Feb 5, 2022
A lightweight, cross-platform epub reader.

Pend Pend is a program for reading EPUB files. Check out the web demo! Preview Image(s) Installation Building Pend is simple & easy. You should be abl

bx100 11 Oct 17, 2022
Cross-platform (including wasm) persistent key value store plugin for rust games/apps

bevy_pkv bevy_pkv is a cross-platform persistent key value store for rust apps. Use it for storing things like settings, save games etc. Currently, it

Johan Klokkhammer Helsing 25 Jan 9, 2023
Cross platform rendering in Rust

Miniquad Miniquad is a manifestation of a dream in a world where we do not need a deep dependencies tree and thousands lines of code to draw things wi

Fedor Logachev 937 Jan 4, 2023
A cross platform classic RPG game creator written in Rust.

Eldiron - Classic RPG Creation Create RPGs for every platform with Eldiron. Eldiron v1 will be able to create games similar to the classic Ultima seri

Markus Moenig 164 Jan 2, 2023
A safe, fast and cross-platform 2D component-based game framework written in rust

shura shura is a safe, fast and cross-platform 2D component-based game framework written in rust. shura helps you to manage big games with a component

Andri 28 Jan 17, 2023
Cross-platform compute shader engine

wgpu-compute-toy This is the compute shader engine for https://compute.toys As well as running on the web via WebAssembly and WebGPU, it can run nativ

compute.toys 37 May 9, 2023
A networked (p2p), cross-platform physics simulation example using rollback netcode

bevy_gaff (work in progress) bevy_gaff is an attempt at making a networked (p2p), cross-platform physics simulation using rollback netcode. It synchro

Johan Klokkhammer Helsing 13 Sep 5, 2023
The study of a simple path tracer implementation (image raytracing in shorts)

The study of a simple path tracer implementation (generate a raytraced image, in shorts).

Leonardo Vieira 1 Apr 2, 2022
Work-in-Progress NES / Famicon Image Editor & Map Creator

NESImg An extremely work-in-progress tool for making NES/Famicom-compatible images. When faced with the challenge of formatting artwork in a way that

Katharos Technology 10 Nov 24, 2022
Simple image transforms for embedded-graphics

Embedded graphics transformations This crate provides generic implementations of simple transformations - rotate by 90 degree increments, mirroring an

Jeremy Fitzhardinge 3 Sep 14, 2022
An interactive, low-boilerplate creative coding platform

nightgraph A creative coding platform in Rust. Provides drawing APIs, a CLI, Native and WASM GUIs, and low-boilerplate artwork creation. Designed init

Kyle Kneitinger 21 Oct 3, 2022
A simple new year redpacket platform.

Triangle A simple new year red packet quiz platform. Installation cargo install github.com/Yesterday17/triangle Usage First, write quiz in a TOML file

Yesterday17 3 Jan 31, 2022