What's up guys! In this video I will show you how to program a simple image to ascii converter in C. This is a very simple program and there is a lot of room for improvement. Feel free to experiment with the code your self.
Support: / kaanalpar
Discord: / discord
Twitter: / kaanalpar
Instagram: / kaanalpar
00:00 Copy characters to represent pixel brightness
00:43 Include the stb image library for image loading
01:04 Load the image
01:36 Check if the loading was successful
02:15 Print out the information of loaded image data and compare it to the original image
02:48 Loop over the pixel data, one pixel at a time
03:20 Take out the RGBA data
03:44 Calculate the average of the RGB values
03:58 Calculate the value to index the character array
04:21 Print out the indexed char and put a space after every row
05:00 First run, on the terminal
06:22 Second run, this time print the output to a .txt file
Негізгі бет Ойындар Coding an Image to ASCII Converter in C
Пікірлер: 4