Skip to content

A Random Image Generator for Linux, written in C for performance.

License

Notifications You must be signed in to change notification settings

SzBenedek2006/RIG-Linux

Repository files navigation

RIG-Linux - (Random Image Generator)

This project is work in progress... GitHub stars License Code Size

This program creates images from random pixels, based on user input.

Users can currently specify:

  • Size (width x height)
  • The use of alpha channel in PNG (transparency)
  • Image count (how many images will be generated)
  • To put the images in android internal storage instead of termux home directory when specified
  • Output debug info
  • Quality for JPEG images

Dependencies

You need to have clang, make, git, and libpng installed on your GNU/Linux machine. On Fedora you also need libpng-devel.

Fedora

sudo dnf update && sudo dnf install libpng-devel libjpeg-turbo-devel gcc make git

Termux

apt update && apt install libpng libjpeg-turbo clang make git

Arch

sudo pacman -Syu libpng libjpeg-turbo gcc make git

Debian

sudo apt update && sudo apt install gcc make git libpng-dev libjpeg-dev

How to download and build from source

  1. You need to have the dependencies (listed in their section above) installed. If you don't know how to do it, search how to install package name on your Linux distro's name
  2. $ git clone https://github.com/SzBenedek2006/RIG-Linux.git
  3. $ cd RIG-Linux/
  4. $ make It will make an executable named RIG-<your_architecture>. (For example RIG-x86_64 or RIG-aarch64)
  5. $ ./RIG-<your_architecture> -h This will run the program and print the help message. If you don't know your architecture, try autocomplete after ./RIG- with the tab key.

Todo / The current state of the project

  • More output format
  • Basic user input handling
  • User input handling for
    • Formats
      • PNG
      • JPG
        • Compression toggle
      • Webp
      • HEIC
    • Choosing between b&w and color output
    • Resolution
    • Image count
    • Alpha channel (PNG)
  • Fix memory leak
  • Make use of termux setup-external-storage
  • Add debug option
    • Make printing debug messages a function and fix rendering issue with the progressbar
  • Add haptic feedback on Android and speaker feedback in other supported devices
  • Add a progressbar
  • Add CLI completion
  • Add a calculator for file size

Supported OS-es

GNU/Linux, Android/Linux (see the Termux section), and maybe MacOS and BSD systems. If it has the dependencies and mets the POSIX standard, it should probably run, but the program only has official support for Linux and Android (Termux).

Termux

The program can be run in Termux after installing the dependencies. Since the Termux update, you can use --termux-external command to put the output files to your internal storage. This is recommended for easier access to the generated pictures.