https://github.com/zigimg/sdl-example
Example usage of zigimg using SDL2
https://github.com/zigimg/sdl-example
Last synced: 4 months ago
JSON representation
Example usage of zigimg using SDL2
- Host: GitHub
- URL: https://github.com/zigimg/sdl-example
- Owner: zigimg
- License: mit
- Created: 2020-03-18T13:47:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-05T18:50:44.000Z (over 1 year ago)
- Last Synced: 2025-10-10T13:03:54.821Z (8 months ago)
- Language: Zig
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sdl-example
Example usage of zigimg using SDL2. This library uses [SDL.zig](https://github.com/MasterQ32/SDL.zig) for SDL bindings. Be sure to check out the repository including the submodules.
## Build
This example uses zig nominated [2024.11.0-mach](https://machengine.org/about/nominated-zig/). To install using [`zigup`](https://github.com/marler8997/zigup):
```sh
zigup 0.14.0-dev.2577+271452d22
```
Then do
```
zig build
```
to generate the executable.
## Usage
The executable takes one command line argument which is the relative path to an image file. This image is then displayed in a window on the screen if zigimg is able to read this image. For now only 24bit RGB and 32bit RGBA images are supported.