flat assembler
Message board for the users of flat assembler.
Index
> Tutorials and Examples > bmpgen, generate a bitmap based on text. |
Author |
|
retro 27 Jul 2022, 10:02
here's the code, you can see that i commented out a (untested, copy & pasted) rng, you can make the generator generate a random pattern-based image, but the "default" is to get the user input and then store it in a 32bpp bitmap.
https://pastebin.com/rV6msppB |
|||
27 Jul 2022, 10:02 |
|
revolution 27 Jul 2022, 10:58
To avoid links going stale you can also post the code directly to this board either as an attachment, or as inline text when it isn't too long.
|
|||
27 Jul 2022, 10:58 |
|
retro 27 Jul 2022, 12:49
yeah, i know, i do that 'cos i'm used to send code via pastebin lol
|
|||
27 Jul 2022, 12:49 |
|
retro 27 Jul 2022, 14:07
it's simple, the characters you type are bytes, and then these bytes fill the variable conten, and then this variable fills the bmp file starting at offset $7a, turning the bytes into colors. each 4 bytes is actually a pixel, so if you type "abcd", then you'll get $61,$62,$63,$64, which turns into gray on bitmap.
|
|||
27 Jul 2022, 14:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.