👾 Convert BMPs and text files to proper x8086 assembly arrays.
Converts pictures and text files into MASM code arrays. Basic image reading and manipulation in C++, in Visual Studio 2019. Author: Saad Bazaz.
Use cactus_example.txt, 16color-palette or cactus_example.bmp as examples
Follow this guy's awesome tutorial (https://www.youtube.com/watch?v=dyANHsj2UOw&list=PLvpbDCl_H7mfgmEJPl1bTHlH5g-f0kWDM)!
- Create a pixel drawing in mspaint on 25x25 canvas
- Save As => BMP Picture => (24-bit Bitmap)
- Go to https://www.text-image.com/convert/ascii.html, convert the BMP to text
- Save the text in a txt file, place it in the program's solution folder
- Compile the program and feed it the text file
- Create a pixel drawing in mspaint on 25x25 canvas
- Save As => BMP Picture => (16 color Bitmap) !!!!! IMPORTANT !!!!!
- Now, Save As => BMP Picture => (24-bit Bitmap) !!!!! These steps were necessary to convert all extra colors into 16 color !!!!!
- NOW you can place the image in the program's solution folder
- Compile the program and feed it the bmp file
- Create a pixel drawing in mspaint on 25x25 canvas
- Save As => BMP Picture => (24-bit Bitmap)
- Place the image in the program's solution folder
- Compile the program and feed it the bmp file
You can change the color number assignments according to your desire. Just head over to Color.h and change the preprocessor definitions. 👇
-
if you can't find the User_Results folder, make it yourself or download the latest build a) STRUCTURE User_Results =>
-
BMPColorASM
-
BMPMonoASM
-
TextToASM
-
Sometimes the arrays may be terminated by an extra comma so remove that before running the arrays.
-
avoid using pictures bigger than 500x500 pixels. It won't crash in any situation, but it would be slow to render and you'd probably get worried.
-
The program has not been tested with images generated from different programs, like GIMP or Photoshop. In those cases, you would have to look up the HEADER SIZE and change it in the Advanced Configurations
Make pull requests, create Issues, and do everything you want to get information out of me. You can personally email me at [email protected] I'd love to entertain any questions and suggestions!