3 ms·
Regarding slowness, are there no better primitives available here than setBitByIndex and set_pixel? You end up doing lots of calls per pixel, reading bytes, mod
by tuukkah 3y ago
Regarding slowness, are there no better primitives available here than setBitByIndex and set_pixel? You end up doing lots of calls per pixel, reading bytes, modifying some bits in them, writing the bytes back over and over.
For example, if you worked on monochrome bitplanes (8 pixels per byte) for each of R, G and B, you would handle 8 pixels at a time by just writing the 3 bytes. IFF ILBM is a file format (supported e.g. by ImageMagick) for sharing such image data: https://en.wikipedia.org/wiki/ILBM https://en.wikipedia.org/wiki/ILBM