An open API service indexing awesome lists of open source software.

https://github.com/l1mey112/raw-image-v

A simple to parse, raw image file format. Implementations to read images in python and V.
https://github.com/l1mey112/raw-image-v

Last synced: 23 days ago
JSON representation

A simple to parse, raw image file format. Implementations to read images in python and V.

Awesome Lists containing this project

README

        

# raw-image-v
A simple to parse, raw image file format. Implementations to read images in python and V.

[**Blog post**](https://blog.l-m.dev/posts/image_format_v/)

## V implementation

**WARNING: the V and python reader uses little endian byte order**

`v run rimg-reader.v` will run the file in the terminal and the file specified in the main function `test.rimg` will be read and displayed inside the terminal

Default constants
```vlang
const (
r_width = 32
r_height = 32
bilinear_filtering = true // enable or disable texture filtering
)
```

## Python
Create images using the `parser.py` and read or display them using `read.py`

```
$ python3 parser.py

Usage: python3 parser.py
```
```
$ python3 read.py

Usage: python3 read.py
Using _ as will not save the file. (useful for checking corruption)
Appending "show" to the end of program arguments will display the image.
```