Y
Hacker News
new
|
ask
|
show
|
jobs
by
shereadsthenews
2548 days ago
Encoding an image as a repeated sequence of variable-length integers would obviously be a poor choice.
1 comments
rootlocus
2548 days ago
Except.. that's pretty much how raw images are represented. Substituting "integers" for "bytes" if you want channel resolution, or leaving integers if you have 32bit pixel depth.
https://github.com/nothings/stb/blob/master/stb_image.h#L120
https://wiki.libsdl.org/SDL_Surface
link
pwodhouse
2548 days ago
You overlooking the critical term:
variable-length
.
link
https://github.com/nothings/stb/blob/master/stb_image.h#L120
https://wiki.libsdl.org/SDL_Surface