GLSL Image Processing System

Overview

GIPS: The GLSL Image Processing System

An image processing application that applies filters written in the OpenGL Shading Language (GLSL).

This means two things:

  • All filters run on the GPU.
  • Immediate, real-time feedback when changing parameters.

Multiple filters can be combined into a pipeline.

GIPS uses standard GLSL fragment shaders for all image processing operations, with a few customizations.

GIPS runs on Windows and Linux operating systems, and quite possibly others too.

GIPS requires a GPU that's capable of OpenGL 3.3, and suitable drivers. Every GPU made after 2007 should support that; on Windows systems, however, the vendor drivers must be installed. (The drivers installed automatically by Windows often don't support OpenGL.)

Usage Tips

The usage of the program should be somewhat self-explanatory. Here are some specific hints for the non-obvious things:

  • The view can be zoomed with the mouse wheel, and panned by clicking and dragging with the left or middle mouse button.
  • Use drag & drop from a file manager to load an image into GIPS.
  • The filters / shaders that are visible in the "Add Filter" menu are taken from the shaders subdirectory of the directory where the gips(.exe) executable is located.
    • Shader files must have one of the extensions .glsl, .frag or .fs to be recognized.
    • New shaders can be put there any time, they will appear immediately when the menu is opened the next time.
    • Alternatively, drag & drop a shader file (from any directory) to add it to the filter pipeline.
    • See the "Shader Format" document for details on writing filters.
  • The header bars for each filter have right-click context menus. Using these,
    • filters can be removed from the pipeline
    • filters can be moved up/down in the pipeline
    • filters from the shaders subdirectory can be added at any position in the pipeline
  • Filters can be individually turned on and off using a button in their header bar.
  • The "show" button in the filter header bar is used to set the point in the pipeline from which the output that is shown on-screen (and saved to the file) is taken from.
  • Ctrl+click a parameter slider to enter a value with the keyboard. This way, it's also possible to input values outside of the slider's range.
  • Press F5 to reload the shaders.
  • Press Ctrl+F5 to reload the shaders and the input image.
  • Press Ctrl+C to to copy the current result into the clipboard.
    • Note that alpha isn't preserved properly.
  • Press Ctrl+V to replace the current input image with the clipboard contents.
    • Note that not all source applications export the alpha channel. (For example, GIMP and Affinity Photo do, Photoshop doesn't; also, Photoshop won't export more than 3620x3620 pixels at all.)

Limitations

Currently, GIPS is in "Minimum Viable Prototype" state; this means:

  • filters can't change the image size
  • filters always have exactly one input and one output
  • filter pipeline is strictly linear, no node graphs
  • the only supported channel format is RGBA
  • no tiling: only images up to the maximum texture size supported by the GPU can be processed

Building

First, ensure you have all the submodules checked out (use git clone --recursive or git submodule update --init).

GIPS is written in C++11 and uses the CMake build system.

Linux

Make sure that a compiler (GCC or Clang), CMake, Ninja, and the X11 and OpenGL development libraries are installed; At runtime, the zenity program must be available in order to make the save/load dialogs work.

For example, on Debian/Ubuntu systems, this should install everything that's needed:

sudo apt install build-essential cmake ninja-build libgl-dev libwayland-dev libx11-dev libxrandr-dev libxinerama-dev libxkbcommon-dev libxcursor-dev libxi-dev zenity

After that, you can just run make release; it creates a _build directory, runs CMake and finally Ninja. The executable (gips) will be placed in the source directory, not in the build directory.

Windows

Visual Studio 2019 (any edition, including the IDE-less Build Tools) is required. Older versions of Visual Studio might also work, but are untested. GCC / MinGW does not work currently due to an issue in a third-party library.

A simple bootstrapping script is provided; just run win32build.sh, and everything else should happen automatically:

  • the Visual Studio installation is detected (for this, the vswhere tool is downloaded and used)
  • a local copy of CMake is downloaded if there's no system-wide CMake installation
  • a copy of Ninja is downloaded and used
  • CMake and Ninja are called

At the end of this process, a freshly-built gips.exe should have appeared in the source directory. Since GLFW is used as a static library, it should not require any non-standard DLLs.

Using CMake directly, generating projects for Visual Studio is also possible, but it's only really useful for Debug builds: due to a CMake limitation, Release builds will be generated as console executables.

Credits

GIPS is written by Martin J. Fiedler ([email protected])

Used third-party software:

  • GLFW for window and OpenGL context creation and event handling
  • Dear ImGui for the user interface
  • the OpenGL function loader has been generated with GLAD
  • Sean Barrett's STB libs for image file I/O
  • Sam Hocevar's Portable File Dialogs
  • Timothy Lottes' FXAA algorithm is part of the example shaders
  • the documentation in the Win32 binary package is converted from Markdown to HTML using Pandoc
You might also like...
Arduino PNG image decoder library
Arduino PNG image decoder library

An 'embedded-friendly' (aka Arduino) PNG image decoding library

libvot - A C++11 multi-thread library for image retrieval

libvot is a fast implementation of vocabulary tree, which is an algorithm widely used in image retrieval and computer vision. It usually comprises three components to build a image retrieval system using vocabulary tree: build a k-means tree using sift descriptors from images, register images into the database, query images against the database. I

Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR,  Anime4K, RIFE, CAIN, DAIN and ACNet.
Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR, Anime4K, RIFE, CAIN, DAIN and ACNet.

Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR, Anime4K, RIFE, CAIN, DAIN and ACNet.

pngtostl is a program that converts a PNG image into STL 3D models
pngtostl is a program that converts a PNG image into STL 3D models

pngtostl is a program that converts a PNG image into a litophane, in STL format, suitable to be printed by entry level 3D printers.

An AV1 Image (AVIF) file format plug-in for Adobe® Photoshop®

avif-format An AV1 Image (AVIF) file format plug-in for Adobe® Photoshop®. Single images can be loaded and saved using 8, 10 or 12 bits-per-channel, i

HDRView is a simple research-oriented image viewer with an emphasis on examining and comparing high-dynamic range (HDR) images
HDRView is a simple research-oriented image viewer with an emphasis on examining and comparing high-dynamic range (HDR) images

HDRView is a simple research-oriented high-dynamic range image viewer with an emphasis on examining and comparing images, and including minimalistic tonemapping capabilities. HDRView currently supports reading EXR, PNG, TGA, BMP, HDR, JPG, GIF, PNM, PFM, and PSD images and writing EXR, HDR, PNG, TGA, PPM, PFM, and BMP images.

An 'embedded-friendly' (aka Arduino) JPEG image encoding library

Starting in the late 80's I wrote my own imaging codecs for the existing standards (CCITT G3/G4 was the first). I soon added GIF, JPEG and not long after that, the PNG specification was ratified. All of this code was "clean room" - written just from the specification. I used my imaging library in many projects and products over the years and recently decided that some of my codecs could get a new lease on life as open source, embedded-friendly libraries for microcontrollers.

Embed image data directly to HTML files.

compact_html Welcome! Embed image data directly to HTML files. Thanks: cpp-base64: Base64 encoding and decoding with c++. cpprestsdk: The C++ REST SDK

Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI
Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI

Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI

Comments
  • Compatibility with existing systems for specifying shaders ?

    Compatibility with existing systems for specifying shaders ?

    Hello !

    I would like to ask if you would be ok with someone porting your nice shader collection to existing libraries / formats:

    • https://github.com/patriciogonzalezvivo/lygia is a library of pure functions for processing data in shaders
    • Interactive Shader Format (https://isf.video) allows to specify shader's inputs and outputs along with their metadata as you did with comments, but instead by using a JSON spec at the top of the shader ; it is widely used in the creative arts community.
    • It would be great to port them at least to GLSL 4.x format with UBOs (Vulkan-compatible GLSL): this is because this way, one can easily use the glslang/spirv-cross toolchain to automatically generate older GLSL versions of these shaders (e.g. to not have to rewrite your shader code in GIPS), or even to Vulkan, Metal or HLSL shaders so that they could be used on a wide array of platforms.

    Thanks !

    opened by jcelerier 5
Releases(v1.2)
Owner
Martin Fiedler
Martin Fiedler
A fast image processing library with low memory needs.

libvips : an image processing library Introduction libvips is a demand-driven, horizontally threaded image processing library. Compared to similar lib

libvips 26 Nov 10, 2022
C++ image processing and machine learning library with using of SIMD: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX-512, VMX(Altivec) and VSX(Power7), NEON for ARM.

Introduction The Simd Library is a free open source image processing and machine learning library, designed for C and C++ programmers. It provides man

Ihar Yermalayeu 1.7k Jan 5, 2023
Video++, a C++14 high performance video and image processing library.

Video++ Video++ is a video and image processing library taking advantage of the C++14 standard to ease the writing of fast video and image processing

Matthieu Garrigues 692 Dec 28, 2022
ppl.cv is a high-performance image processing library of openPPL supporting x86 and cuda platforms.

ppl.cv is a high-performance image processing library of openPPL supporting x86 and cuda platforms.

null 366 Dec 30, 2022
The CImg Library is a small and open-source C++ toolkit for image processing

http://cimg.eu The CImg Library is a small and open-source C++ toolkit for image processing, designed with these properties in mind: CImg defines clas

David Tschumperlé 1.2k Jan 3, 2023
PoC black/white image sequence to dumpy gif image sequence converter

PoC black/white image sequence to dumpy gif image sequence converter

null 69 Dec 9, 2022
The “Quite OK Image” format for fast, lossless image compression

The “Quite OK Image” format for fast, lossless image compression

Dominic Szablewski 6k Dec 30, 2022
Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.

README for OpenImageIO Introduction The primary target audience for OIIO is VFX studios and developers of tools such as renderers, compositors, viewer

OpenImageIO 1.6k Jan 2, 2023
a generic C++ library for image analysis

VIGRA Computer Vision Library Copyright 1998-2013 by Ullrich Koethe This file is part of the VIGRA computer vision library. You may use,

Ullrich Koethe 378 Dec 30, 2022
Intel® Open Image Denoise library

Intel Open Image Denoise is an open source library of high-performance, high-quality denoising filters for images rendered with ray tracing

Intel® Open Image Denoise 1.3k Dec 28, 2022