How to open an image file?
I know a lot of people, a lot of my students have asked me that we could open a regular file, a text
file using V.I. Kat Moorehead or any other ways to open it's easy or even by the file to open a text
file.
Now, the question that came up was how we could open an image file using the command line.
Well, first of all, if you are in a GUI environment, you could simply double click on that image
file and it will open up.
But if you do not want to use the double clicking thing, then you will want to run a command to open
up a file, an image file, and there is a way to do that.
So image file formats are tenderized means of organizing and storing digital images.
Image files are composed of digital data in one of these formats that can be restor rise for use on
a computer display or a printer.
An image file format may store data in UNCOMPRESS compressed or vector format.
This definition is straight out of Wikipedia.
I just want to quickly go over it.
What we will learn in this lesson is how can we install a program that will allow us to open an image
file and command Syntex to open that image file and go.
All right.
So let's go into our Linux machine.
I have my Linux machine right here.
Now, if you have an image you could on the GUI, you could just simply double click and it will open
up.
But the question right here we have is we want to run a command to open up a image.
But please do remember, if you are getting into your Linux machine to SSA or through PUDI and then
you try this, it will not work because images, goolies and stuff like that do not work on Linux terminals.
So for us to try out how we could open it, we have to actually first get an image into our system.
So I have my Firefox open.
I went to Google dot com and I actually.
Clicked on Google, typed lyrics, I went to images and it gave me a whole bunch of lyrics, related
images, let's pick anyone that you like.
I will pick this penguin right.
Click on this image and click on Save Image as this will ask you, where do you want to save this image?
So pick desktop because this is your desktop where you will be saving your image.
So scroll down and click save.
Now, you could go back up, you could close this Firefox because our images download it.
As you can see, it is right here.
And if you wanted to open up this image and all you do is you double click and it will open up the image
and you'll then it's perfect.
Now, again, going back to my question is now, how can we open that using command?
So which territory I am in?
I'm in home.
I have Afsal if I go to my desktop and who else mysel.
I do see the file is zero which is twelve hundred, which is the same name as this.
If I do cat on it then what happened.
Oops.
It doesn't know what that file is or how to open it.
Then what.
Which the command that I can run to open that image.
Well for that you have to install a program called Image.
So what this document says is basically you have to become root.
So let's go become route.
And then you have to run the command, install image magic, that's a package name, actually, so let's
clear the screen.
And before we do the YUM install, let's make sure we could get out to the Internet.
So to confirm that we could get out to the Internet, you could simply Peng, dub, dub, dub dub,
Google Dotcom and we are getting the reply back.
Perfect.
Now you could go ahead and do yum install image magic minus Y.
So it is looking for the package that we want one to download, it is looking for dependencies, OK?
It asks that the package install packages.
One size is nine point one.
Meg, it went pretty fast because we have given the option to given the option of why, which is minus
Y for.
Yes.
To go ahead and install it.
Now let's confirm if that image r.p.m. has been installed R.P.M..
So there you go.
Image magic.
This is the R.P.M. This is the program that allows you to open your image file.
Now you are now you have to run the command, which is display space image of the file, the file name,
actually.
All right.
So before we do that, let's get into our directory where that image is located.
So that is in our home.
I have solid directory.
Then you do this minus you will see it has all the directories and files.
But we had downloaded that image file in desktop folder, then do a list minus L and you will see our
file is there.
Now you can run the command, display the file name and hit enter and this will open up your image file.
That's how it works if you wanted to use this command to open up the image file.
But anyway, I do, I'll let you know in corporate world we do not have too much application or application
or its use in a real world.
We don't really use this command or this package.
But anyway, I listen to my students as always, and I have included this lesson.
So this way, if someone wants to find out how to open an image file to the command line, they would
know how to do that.
All right.
Good luck.