Context: I earlier asked for an image viewer which shows images as tiles.
Charlie named a few editors with the capability, but that somehow wasn't ideal for my workflow since I mainly use Inkscape. So I created the most minimal tile viewer I could think of, which displays the image as a 5 x 5 grid and thought maybe you could use that C snippet, too, if that fits to your workflow.
You just put the image as the first parameter, which means you can drag and drop an image on the executable symbol, if your desktop supports it.
It depends on SDL2 and SDL2_Image.
Using MINGW, you can compile it with:
- {l Code}: {l Select All Code}
gcc tiledview.c -I "C:\PATH_TO_SDL_Image\include\SDL2" -I "C:\PATH_TO_SDL\include\SDL2" -L "C:\PATH_TO_SDL_Image\lib" -L "C:\PATH_TO_SDL\lib" -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -Os -Wall -Wextra -mwindows
On Linux it should be basically the same, minus the paths and the Windows/MINGW flags.
Feedback is welcome!