We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

skipcave
Posts: 2
Joined: Fri Aug 02, 2013 5:56 am
Location: Dallas Texas

Viewing a jpg on the graphic screen

Fri Aug 02, 2013 6:16 am

I have taken my first picture on my Pi, using the command:
raspistill -o image1.jpg
I see 5 seconds of the camera image on the screen, (live image) before the photo is taken
So now I have a file in my directory labelled: image1,jpg
I am running the latest Raspian OS, just downloaded today, with all the updates for the camera.

Now I want to view that image1.jpg on my graphic screen which is connected to the HDMI port on the Pi. What command do I issue in the LX terminal window on the graphics screen to display the jpg image on the screen? I don't care how long it takes to display it, I just want to see it.

Second, I can SSH into the Pi from my laptop over Ethernet. What programs and commands do I need to transfer that same file from the Pi to my laptop?

Skip

kmorley
Posts: 2
Joined: Tue Apr 30, 2013 2:43 pm

Re: Viewing a jpg on the graphic screen

Fri Aug 02, 2013 11:40 pm

skipcave:

I don't have an answer to the first part of your question, but I can provide a little insight on the second part regarding moving files across the network to/from the RPi flash file system.

SSH is a character-based terminal emulator and does not offer any file transfer capability that I am aware of. But like just about every other Linux distribution, Raspbian supports several open-source FTP servers. I prefer to use vsftpd and if you Google "raspbian" and "vfstpd" you will find all the instructions you need.

Just remember that the FTP client is the end that controls the transfers, regardless of transfer direction. A FTP client always connects to an ftp server. You won't get much done connecting together two ftp clients or two ftp servers - you need one of each.

Once you have vsftpd installed, you can use an FTP client at the PC (Windows has a cli ftp client built-in - just type "ftp" at a command prompt). There are graphical FTP clients like CuteFTP which might be easier to use.

I hope that helps!

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Viewing a jpg on the graphic screen

Sat Aug 03, 2013 2:15 pm

Note that SSH might itself only be a way to get terminals , but
is part of a powerful suite which supports lots of other
things.

Sure enough , the Secure File Transfer Protocol (SFTP) is
onboard if you have installed Raspbian. No need to
install a FTP server ( which is inherently insecure because even
passwords are sent in clear text !).

FileZilla does support SFTP , not so sure about the other
programs.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Viewing a jpg on the graphic screen

Sat Aug 03, 2013 2:54 pm

An for actually viewing the images :
feh , qiv and perhaps even fbi.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

klricks
Posts: 8928
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: Viewing a jpg on the graphic screen

Sat Aug 03, 2013 3:13 pm

You can use the included image viewer program. From the desktop menu it's under Accessories..... Or from the command line type:
gpicview

There are several ways to get files over to another computer.
- use a USB 'thumb' drive
- email to yourself using a web base client email service
- upload to a image sharing site
- ftp as mentioned.
- Install Samba and set up a network share so all computers on your network and access a folder/ files on the RPi.
- Install RDP and remotely access the RPi desktop GUI. RDP won't transfer files without one of the above but it will allow to to open the image viewer or whatever and you will see the image on your remote computer.
3B+ & 4B4G Running RPi OS Bookworm w/ Desktop

skipcave
Posts: 2
Joined: Fri Aug 02, 2013 5:56 am
Location: Dallas Texas

Re: Viewing a jpg on the graphic screen

Sat Aug 03, 2013 10:36 pm

@ ghans:
Luckily, it happens that I have Filezilla installed on my Win7 laptop. Are you saying that Raspbian will automatically install the SFTP server on the Pi as part of the standard boot, and then run it? Or do I have to start the SFTP server up, before I can connect to it? If I need to start up the server on the Pi, what are the commands?

SwanseaMick
Posts: 45
Joined: Wed Aug 08, 2012 8:05 am
Location: Gower, Swansea

Re: Viewing a jpg on the graphic screen

Sun Aug 04, 2013 5:49 am

skipcave,

Try winscp (search posts for more details) to view files on your Pi from your Windows PC. This gives a graphical 'file explorer' type view, with Windows files and directories shown in one pane, and Pi files and directories in the other.

I use it all the time, and find it great for viewing, editing files on the Pi, and for moving/copying files between Pi & PC.

Mike

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Viewing a jpg on the graphic screen

Sun Aug 04, 2013 8:09 am

AFAIK sshd/sftpd are running by default on Raspbian , no need
to explicitly start them.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

an7hr4x666
Posts: 1
Joined: Sat Jan 04, 2014 6:20 pm

Re: Viewing a jpg on the graphic screen

Sat Jan 04, 2014 6:38 pm

hi there i was having all the same issues, but found this to be the easiest way of either
displaying a jpg or similar stored on your pi accross your network and display on ssh screen......
or
taking a new pic and displaying on your ssh screen

first on the device you have used to ssh into the pi issue the follwing command in a terminal, this will make it listen for imput on port 5001 and then display on screen, use man display for more options

nc -l -p 5001 | display

[display is part of the inkscape package i believe, if you dont have this type sudo apt-get install inkscape]


now on the pi[via your ssh terminal...type...this will send image of your choosing accross networkwith netcat

cat [name of your image] | nc 192.168.0.5 5001 -w 7

or for taking a new picture and then sending,

raspistill -o - | nc 192.168.0.5 5001 -w 7

-w7 needed to issue slight delay, i didnt get to workwithout this....
always make sure you have the listening window running first.........if doesnt work first time just set listener of again, and try again

now if you have trouble still, i bet the problem may be that you will need to forward port 5001[can be any but i use this port number], to the device your going to be ssh in from. and even maybe opening the same port through your firewall, this may sound obvious, but surprinsing how many forget.......

just google how to foraward ports on your specific router , same for opening ports through a firewall for your
particular OS...................


I HOPE HAS HELPED SOMEONE....

thchan
Posts: 1
Joined: Sun Oct 12, 2014 6:51 am

Re: Viewing a jpg on the graphic screen

Sun Oct 12, 2014 6:56 am

here is how I view the jpg image files:
1. using the LXTerminal , go to the directory where your image files are located
2. use pwd command to find the absolute directory path of the image files, you should get something like "/home/pi"
3. use Epiphany Web Browser and type in the complete path and the file name, something like "/home/pi/image.jpg"
4. your image should be displayed
HTH.

Return to “Beginners”