Page 1 of 1

Create a Image from a batch file.

Posted: 02 Jul 2021 17:05
by rasil
Hello!

Is there a way to create a image with a batch file only? i was thinking like a 64x64 with big pixels being drawn line by line. Is it possible to input a array of numbers and the batch file being able to output a bmp or a jpeg? such as colour codes for batch file like this: F = white C = red
Input:

Code: Select all

FFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFCCCCCCCCCFFFFFFFFF
FFFFFFFFCCCCCCCCCFFFFFFFFF
FFFFFFFFCCCCCCCCCFFFFFFFFF
FFFFFFFFCCCCCCCCCFFFFFFFFF
FFFFFFFFCCCCCCCCCFFFFFFFFF
FFFFFFFFCCCCCCCCCFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFF
Output:
Image

Thanks in advance have a good day!

Re: Create a Image from a batch file.

Posted: 02 Jul 2021 22:13
by T3RRY
Check out either of the following:

AGerman's Prnt Bmp:
viewtopic.php?t=9869

Misol101's CMDGFX:
viewtopic.php?t=7153&start=105

Re: Create a Image from a batch file.

Posted: 03 Jul 2021 08:15
by aGerman
This takes ages because the 4-bit RGBI information has to be converted into 24-bit RGB information first. Someone else may try to improve it ...

Steffen

Re: Create a Image from a batch file.

Posted: 03 Jul 2021 08:34
by IcarusLives
You can also check my version of displaying .ppm files

viewtopic.php?f=3&t=8087&p=53745#p53745

Re: Create a Image from a batch file.

Posted: 03 Jul 2021 09:21
by rasil
aGerman wrote:
03 Jul 2021 08:15
This takes ages because the 4-bit RGBI information has to be converted into 24-bit RGB information first. Someone else may try to improve it ...

Steffen
Woah! :shock:

This is exactly what I am looking for but as you have stated it is slow and to make it faster can the RGB colour code directly be added to the txt file using a online colour picker like this
Image

I chose to use the batch colour codes because it was going to make it easier for me to make pictures but as this is exactly what i was looking for I'm willing to input the RGB colour codes. or anything similar.

Thanks

Re: Create a Image from a batch file.

Posted: 03 Jul 2021 10:01
by aGerman
T3RRY already linked my original thread. Look at post #4 viewtopic.php?p=63470#p63470

Steffen

//Edit: Also updated the makebmpfromrgbi.zip above to improve the performance a little.

Re: Create a Image from a batch file.

Posted: 03 Jul 2021 17:36
by rasil
Excellent! :D

Great work Steffen! your edit improved performance a lot. Thanks for taking the time to help me!