Code Monkey home page Code Monkey logo

img_maniac's Introduction

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

img_maniac's People

Contributors

adsick avatar allendang 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

img_maniac's Issues

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.

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?

rename/rebrand (opinionated)

In my humble opinion "image maniac" is not a very good name for an image viewing program. I'm not going to motivate that, and leave it for you to decide.

We can discuss possible alternative names here.

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.

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)

Does not compile on Linux

There are problems in winit - to fix this we need to add "wayland" or "x11" feature in Cargo.toml.

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.