Batch Archive [Version 2.1.0001]
Copyright (c) 2017 TheBATeam. All Rights Reserved

C:\Users\TheBATeam>

How To Show Images on cmd Console? | Advanced CMD | InsertBmp.exe

January 26, 2018
How To Show Images on cmd Console?
How To Show Images on cmd Console?
Hey Hello there! We Hope you are good#TheHacker Welcomes you to the another article for improving the level of your Batch programming Skills. In this article, We'll talk about the common problem among the batch programmers across world-wide. The Question of, "How To Show Images on cmd Console? " has irritated almost all the Batch programmers, including me. #TheHacker has tried many Different methods to convert The Regular image files into Batch Readable format. In the search of this concept, we've created an awesome Batch Project named, "Bpaints v.1.0". And made a new file extension .Bim (Batch Image files), but no method is perfect enough. Do keep in mind, that the project is not completed yet. So, Some of the features mayn't work. You can contribute to complete the project too. Just submit your Work at: Submit your Work

Think Twice, Code Once! "

So, we were talking about Displaying regular image files in the cmd console. Yeah! We are about to reveal the secret. But, before that you need to know one simple concept that we can only load / Show a specific type of image files on the console window. We can't directly load .jpg, .png, .gif etc into the console. We can only load .Bmp (Bitmap Image files) in the console screen. It is due to the limited scope of InsertBmp.exe.

The Magical Plugin | InsertBmp.exe
InsertBmp.exe is a small 15.5 KBs of Batch plugin. Although We don't have any information about the developer of this amazing batch plugin. But, We really thank him from the depth of our heart for providing us with this great and effective batch extension. Without it, It seems impossible to make the cmd console that much beautiful and attractive. 
The Extension helps in loading the regular Bitmap Image files (.Bmp) into the CMD console Window. If you have an image file with any other extension than .Bmp, then simply:

Right click on Image > Open With > Paint > Save As > *.Bmp

Or you can also Try to use some extra Plugins similar to ffmpeg.exe etc. They will give you independence of directly converting your images from command line in a single line of code. #TheHacker will also provide an article about "Converting Image formats using Command line tools."

Displaying Image in CMD | Layering Negative With 'Mark' Option
Displaying Image in CMD | Layering Negative With 'Mark' Option
Using the InsertBmp.exe plugin is very easy. The Best thing about this plugin is that, it provides an amazing option for Zoom level of the image. I.e. You can also provide the zooming Percentage of the image in the CMD console. The Syntax of Usage is as Follows:

"InsertBmp /x:0 /y:0 /p:"Path of Image" /z:50"

Where, Each of the Switch has its own importance while loading image. You can skip anyone of them. And the Plugin will take the default values for those switches. The Values in Yellow Color are changeable, and they depend upon your requirement. But You definitely need to specify the /p:"Path of Image" parameter. 
Note: The Image should be a .Bmp file. 😌


  The Code | Simple Example to Show Image on CMD
The Code | Simple Example to Show Image on CMD 
The Image you have seen above in the title of the article, is displayed with the help of this simple Code. The Code seems to be bit bulkier in first instance. But, as you go Deeper in it. You may notice that, there are plenty of comments (Using Rem Command). And due to those comments it seems to be a Massive Code for doing such a simple task of loading an Image into the console.


Playing With the Negative Space
Playing With the Negative Space
As you may have noticed that, We have also used the Call OS _Result in the 11th Line of the Code. That is an extra function (OS.Bat) we have created and used in order to make this example File Perfect for you to use. Otherwise, The console screen size is different in Windows 10 & Windows 7 for the same Numbers with Mode Command. I don't know why? But, Somehow The character size is bit different in Windows 10 than in Windows 7
So, We need to Detect the current OS of the user and then, Set the screen size according to it. Then, we can execute the same Code, with same results in approx. All the OS's of Microsoft. 

InsertBmp.exe | Help Menu
InsertBmp.exe | Help Menu
And Now you know the Simple method to show Images in your Batch Projects. You can simply Download and Use this Amazing Batch plugin from the link given below. We've Used this Plugin in many of our Batch Projects, Such As Resistor Decoder v.1.0 By Gls. Have a look and Show Your Love Through Comments.


If you are still in Doubt, You can watch this simple video about InsertBmp.exe from above. We hope that, it'll clarify your doubts. And appreciating our work will not reduce your self-respect. We're taking out little time from our busy college schedule, for posting articles on the Blog. Thanks for your support and Love.

Keep Learning, Keep Sharing...
Be Happy, Spread happiness...

Download Link:

#TheHacker

No comments:

Powered by Blogger.