[Help] Image in batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Tameima
Posts: 1
Joined: 26 Mar 2017 18:17

[Help] Image in batch file

#1 Post by Tameima » 07 May 2017 13:06

I'm working on a simple text based adventure game, and i need to add some images to my batch file like images for items, locations, background.
Is there any way? Tool, Plugin?

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: [Help] Image in batch file

#2 Post by ShadowThief » 07 May 2017 15:36

The command line is text-only. The closest you're going to get is with ASCII art.

Also, text-based adventure games by definition do not have graphics.

PaperTronics
Posts: 118
Joined: 02 Apr 2017 06:11

Re: [Help] Image in batch file

#3 Post by PaperTronics » 09 May 2017 07:00

You can use InsertBMP.exe made by aGerman. You can find this plugin on my website: http://www.thebateam.org/2016/11/how-to-show-images-on-cmd-console.html

Though if you have a image in another format e.g JPG or PNG insertbmp.exe will refuse to work

But....

You can convert it into BMP using Microsoft Paint. Just click on the button near the Home text at the top of the window and then Save As > BMP Picture



PaperTronics

Compo
Posts: 599
Joined: 21 Mar 2014 08:50

Re: [Help] Image in batch file

#4 Post by Compo » 09 May 2017 10:19

PaperTronics wrote:You can use InsertBMP.exe made by aGerman. You can find this plugin on my website: http://www...

I must say it's a little shameful, on a site frequented by aGerman, to use his work as yet another plug to your website.

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

Re: [Help] Image in batch file

#5 Post by aGerman » 09 May 2017 13:17

It's freeware. So I'm fine :wink:

Steffen

PaperTronics
Posts: 118
Joined: 02 Apr 2017 06:11

Re: [Help] Image in batch file

#6 Post by PaperTronics » 12 May 2017 07:26

Compo wrote:
PaperTronics wrote:You can use InsertBMP.exe made by aGerman. You can find this plugin on my website: http://www...

I must say it's a little shameful, on a site frequented by aGerman, to use his work as yet another plug to your website.


Compo I just pointed to my website so that he could know how to use it. I could've added the syntax of InsertBMP in the reply but I din't want to make it long. So that's why I pointed to my website.

My apologies if I did anything wrong

craftdium
Posts: 4
Joined: 02 Aug 2019 10:44

Re: [Help] Image in batch file

#7 Post by craftdium » 02 Aug 2019 10:46

I would like to make insertbmp.exe work with the latest version of Windows 10

penpen
Expert
Posts: 1991
Joined: 23 Jun 2013 06:15
Location: Germany

Re: [Help] Image in batch file

#8 Post by penpen » 03 Aug 2019 07:41

If i remember right, then aGerman is the developer of "insertbmp.exe" and gave misol101 the source who implemented it in his utility "CmdBkg.exe":
viewtopic.php?t=7407

If "insertBmp.exe" doesn't work under winows 10, then i would suggest to use "CmdBkg.exe" instead.


penpen

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

Re: [Help] Image in batch file

#9 Post by aGerman » 04 Aug 2019 02:18

Yes, CmdBkg is definitely the better choice. Not only that I don't know the reason why insertbmp doesn't work anymore, it would only draw in the console window itself which makes the image volatile.

Steffen

misol101
Posts: 475
Joined: 02 May 2016 18:20

Re: [Help] Image in batch file

#10 Post by misol101 » 04 Aug 2019 03:12

CmdBkg will stretch the image to cover the entire cmd window though, which might not be what you want.

Cmdgfx_RGB might be a better choice (it can show BMP images among many other things), although I agree it seems strange that InsertBmp does not work.


Edit: there is also Cmdwiz ”insertbmp” operation, try if that works (simpler to use than cmdgfx_RGB, a few more options than aGermans insertbmp)

craftdium
Posts: 4
Joined: 02 Aug 2019 10:44

Re: [Help] Image in batch file

#11 Post by craftdium » 08 Aug 2019 10:34

thanks for all the answers you gave me what I would like to do is do exactly like InsertBmp with windows 10 but the problem is that it does not work with Windows 10

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

Re: [Help] Image in batch file

#12 Post by aGerman » 08 Aug 2019 13:13

I am the author of insertbmp. I did several tests and I confirm that this tool doesn't work using the new Windows 10 console. It still inserts the image, but it persists only as long as the insertbmp.exe process lives (some milliseconds). That means Microsoft changed something in the new console host. I don't know how to work around this issue.

Steffen

craftdium
Posts: 4
Joined: 02 Aug 2019 10:44

Re: [Help] Image in batch file

#13 Post by craftdium » 08 Aug 2019 13:19

you would not have an alternative if you find an alternative I will be a taker because it's been 5 or 6 months that I seek if you discord you could pass me your discord or I pass mine to you strictly POKEFAN62 # 9795

hxr404
Posts: 1
Joined: 29 Feb 2020 06:52
Location: Germany

Re: [Help] Image in batch file

#14 Post by hxr404 » 15 Aug 2020 07:12

aGerman Can you add a duration parameter to insertbmp please, I think it could fix the issue that
aGerman wrote:
08 Aug 2019 13:13
it persists only as long as the insertbmp.exe process lives (some milliseconds).
Thank you

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

Re: [Help] Image in batch file

#15 Post by aGerman » 15 Aug 2020 08:51

Unfortunately this doesn't fix anything. Letting the process live longer also means that the batch processing waits until the process terminates. But this doesn't make sense because you certainly want to immediatelly continue in your script. And guess what happens if the proces finally terminates ...
So, no this tool is just dead. If you want to have images then have a look at misol101's tools. Or use the Windows Terminal app to launch your batch scripts where you can define background images in its JSON profile settings.

Steffen

Post Reply