LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-06-2016, 02:40 PM   #1
billsee
Member
 
Registered: May 2013
Posts: 42

Rep: Reputation: Disabled
Smile Reading exif data from a C program


I have been hunting around on the WEB trying to find a way to
read exif data from my .jpg images. I am running CentOS 6.8.
The Eye of Gnome (EOG) program shows the exif data but, as far
as I know, cannot save it to a file or stdout. I need a routine
that will read exif data from the command line and print it out
or can be called directly from a C program. libexif is installed
on my system.
 
Old 07-07-2016, 01:36 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
https://en.wikipedia.org/wiki/Exchan...rogram_support
 
Old 07-07-2016, 06:46 AM   #3
billsee
Member
 
Registered: May 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
This answer gave me a link to a Wikipedia page describing the EXIF
format and did not answer my question.
 
Old 07-07-2016, 06:50 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
and tell you about libexif, and also will point you to: http://libexif.sourceforge.net/
and also it has some examples: http://libexif.cvs.sourceforge.net/v...trib/examples/
 
Old 07-07-2016, 10:34 AM   #5
billsee
Member
 
Registered: May 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
I have libexif installed. What I need is an application (program) that
I can dowload and install that will allow me to look at EXIF data from
the command line so I can incorporate it into another program.
Can you suggest an application?
 
Old 07-19-2016, 08:06 PM   #6
rhubarbdog
Member
 
Registered: Apr 2015
Location: Yorkshire, England
Distribution: Linux Mint
Posts: 145

Rep: Reputation: Disabled
in bash interogate variable $? holds the int value which is the exit(EXIT_SUCCESS) value.
you can transfer the output of stdout text to be arguments using $(...) or `...`
from a c program whether using system or execv both have an int as their return value, this will be the exit value of the command just ran
 
Old 07-19-2016, 09:11 PM   #7
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Searching for "read exit data jpg linux" gave me

https://mikebeach.org/2011/12/17/how...-ubuntu-linux/
http://linux.die.net/man/1/exiftool
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading EXIF data billsee Linux - Software 4 09-09-2014 12:17 AM
Trouble reading binary data files with Fortran 77 program on Linux box with gcc kab Programming 1 02-04-2010 11:13 AM
Missing EXIF data in Kuickshow (KDE 4.2.4) 2Gnu Linux - Desktop 3 09-12-2009 07:07 PM
Change Exif data in linux? shwouchk Linux - Software 2 12-02-2006 06:31 AM
having problems reading data into a C program Hockeyfan Programming 2 05-24-2004 04:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration