Create a Image from a batch file.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
rasil
Posts: 31
Joined: 23 Apr 2020 13:05

Create a Image from a batch file.

#1 Post by rasil » 02 Jul 2021 17:05

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!

T3RRY
Posts: 243
Joined: 06 May 2020 10:14

Re: Create a Image from a batch file.

#2 Post by T3RRY » 02 Jul 2021 22:13

Check out either of the following:

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

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

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Create a Image from a batch file.

#3 Post by aGerman » 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
Attachments
makebmpfromrgbi.zip
(1.98 KiB) Downloaded 249 times

IcarusLives
Posts: 161
Joined: 17 Jan 2016 23:55

Re: Create a Image from a batch file.

#4 Post by IcarusLives » 03 Jul 2021 08:34

You can also check my version of displaying .ppm files

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

rasil
Posts: 31
Joined: 23 Apr 2020 13:05

Re: Create a Image from a batch file.

#5 Post by rasil » 03 Jul 2021 09:21

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

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Create a Image from a batch file.

#6 Post by aGerman » 03 Jul 2021 10:01

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.

rasil
Posts: 31
Joined: 23 Apr 2020 13:05

Re: Create a Image from a batch file.

#7 Post by rasil » 03 Jul 2021 17:36

Excellent! :D

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

Post Reply