How display an image/pictures on cmd screen?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
tcpman
Posts: 53
Joined: 05 Mar 2014 15:01

Re: How display an image/pictures on cmd screen?

#16 Post by tcpman » 14 Sep 2014 10:09

@aGerman

well realy good stroy i enjoy reading it!
its very good that the end was a good end!


i want to use the convertor just like you!
so then no one can do a right click and then edit the script!
i am aware that getting source code its very easy!
even if someone want to get the souce and he dont know this trick
he can easily open the exe file in a debugger like olly and see the source!
i test that and olly will give you the source in a minute
i know all of this!
but i just dont want to someone do a right click and then edit and then get the source!
this is not matter if there was a simple 10 line or 100 line or even 1000 line of code! but when there is more its hard to give the source away and then see your source in other site's but not with your credit!

in anyway i know getting the source is a easy way but i just want to someone can't do that with a simple right click



@einstein1969
thank you very nice work!.

i will try them !

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

Re: How display an image/pictures on cmd screen?

#17 Post by aGerman » 14 Sep 2014 11:35

I never saw a batch file that was worth it to hide its source code. I rather enjoy if code I wrote was found on other sites as well (with or without credits doesn't matter as long as it helps others). Again - it's your decision ...

As to your picture question ... erm ... I seldomly share executable programs that I wrote. Let's make an exception to that rule - just for fun and to show you that console windows are not made to display pictures ... Download InsertBmp.zip from this site and let the super nova glow in your batch window. It only supports *.bmp files. However enabling other file formats would be a waste of effort from my point of view...

Regards
aGerman

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

Re: How display an image/pictures on cmd screen?

#18 Post by ShadowThief » 14 Sep 2014 17:54

dbenham has a program that utilizes encrypted code: viewtopic.php?f=3&t=4876

You might be able to get some ideas about ways to hide your source while still making the script work.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: How display an image/pictures on cmd screen?

#19 Post by foxidrive » 14 Sep 2014 20:48

tcpman wrote:but when there is more its hard to give the source away and then see your source in other site's but not with your credit!


That's funny! You must also credit every person in your code that gives you any kind of tip, and the forum that they came from. :D

tcpman
Posts: 53
Joined: 05 Mar 2014 15:01

Re: How display an image/pictures on cmd screen?

#20 Post by tcpman » 15 Sep 2014 08:04

@agerman
well some of them may worth you dont know that for sure right?
tnx for source bmp is ok there is not any problem with picture format


@shadowthief
i will going to take a look
thank you
@foxdrive
look are you be happy if you write at least 3000 line of code and then you see someone just used that and put his name in front of it?
i will give credit if i use any code but so far all i wrote is myself
but i have to use some color function so i will give the credit then !



also i have one question when we should turn off the
delayedexpection?
i mean is there any problem if we leave it enable in whole script?

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

Re: How display an image/pictures on cmd screen?

#21 Post by aGerman » 15 Sep 2014 12:00

tcpman wrote:@agerman
well some of them may worth you dont know that for sure right?

Just my conviction:
- The only real cause to hide the code would be if you plan to earn money with your script (even if I believe ["don't know for sure"] nobody would pay for a batch script). Otherwise it would be meaningless.
- Even if you ask people to pay for it you could send out the plain script after they paid.
- You know how simple it would be to get the source code once you execute the converted exe file. Why accept the drawbacks and side effects then?
- If you think you made a good job of it wouldn't it be great to share your knowledge instead of trying to keep it a secret? (You may have noticed that I included the source code of my small C tool to let people know how it works.)


tcpman wrote:also i have one question when we should turn off the
delayedexpection?
i mean is there any problem if we leave it enable in whole script?

Delayed expansion causes problems with literal exclamation marks.
Rough rule of thumb:
Assigning a variable is safe with delayed expansion disabled. Working with the assigned variable is safe with delayed expansion enabled.

EDIT: Something to play with

Code: Select all

@echo off
setlocal DISableDelayedExpansion
set "line=The teacher angry: Shut up! Be quiet & listen to me!"

setlocal ENableDelayedExpansion
echo !line!

pause>nul

Code: Select all

@echo off
setlocal DISableDelayedExpansion
set "line=The teacher angry: Shut up! Be quiet & listen to me!"

echo %line%

pause>nul

Code: Select all

@echo off
setlocal ENableDelayedExpansion
set "line=The teacher angry: Shut up! Be quiet & listen to me!"

echo !line!

pause>nul


Regards
aGerman

tcpman
Posts: 53
Joined: 05 Mar 2014 15:01

Re: How display an image/pictures on cmd screen?

#22 Post by tcpman » 16 Sep 2014 07:02

lol nice exmaple tnx



no! is not about money!


ok looks like you convince me! i should post the source then!

einstein1969
Expert
Posts: 941
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Re: How display an image/pictures on cmd screen?

#23 Post by einstein1969 » 10 Mar 2017 14:13

with my code is possible get an result like this (using a 1x1 fonts and a calculate palette):

on left a dos windows, on rigth the windows viewer.
Image

Post Reply