starting to do the complete (messy) encoder pipeline, todo: writing SOS segment!
SOS segment
fixes
full jpeg encoder (that works with one-color images <= 8x8 size :D)
copy-paste bug...
transform ppm color values back to [0, 255] range if a maxval < 255 is given
8x8 block ordering is horizontal then vertical, going through the pixel rows (not columns!)