LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-10-2009, 05:09 AM   #1
urvesh
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
how should I get jpeg file header using C language?


I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U, please suggest me?

Thanking U

From: Urvesh Purohit

Last edited by urvesh; 10-10-2009 at 05:11 AM.
 
Old 10-10-2009, 09:15 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by urvesh View Post
I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U, please suggest me?

Thanking U
Please spell out your words and write clearly. Your question is almost impossible to understand.


A good description of JPEG headers can be found here:
http://www.obrador.com/essentialjpeg/headerinfo.htm

Lots of sample code for reading JPEG's can be found through Google, and lots of Linux programs (EOG, GQview, etc.), have source code you can look through.
 
Old 10-10-2009, 10:13 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by urvesh View Post
I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U, please suggest me?

Thanking U

From: Urvesh Purohit
Can you please describe your problem more clearly?
 
Old 10-10-2009, 10:15 AM   #4
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by urvesh View Post
I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U, please suggest me?

Thanking U

From: Urvesh Purohit
http://www.fastgraph.com/help/jpeg_header_format.html
 
Old 10-10-2009, 01:51 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 10-11-2009, 01:48 AM   #6
urvesh
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Please help me in my college project

I am sorry for I have asked U a question is not understandable.
So i asked U for some Idea or little code for My college project.

My college project definition............

Q: Make a system using C language, such system can perform as follow

when we create any file on windows, by changing its extension,
unknown person who does not relate with that file can not know originally in which format that file is made.
So,by reading that file in program then that system check in which type that file is made originally.

Example as:
make file in type word ( .doc ) then change extension to access ( . mdb ).So that file now always open in access, But when we put that file in System(project) then that system can check the file originally of type word.

If possible then send me code or any website link. I wish to make this system in Java or C.....

Link by proj. guide :
fetch the every files' headers
Thanking U
BY: Urvesh
 
Old 10-11-2009, 10:11 AM   #7
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Headers generally go along with libraries, unless they describe a binary struct that's at the beginning of the file (not sure if JPEG is like this; probably is.) Even so, there is a libjpeg, which would probably help.
Kevin Barry
 
Old 10-11-2009, 05:03 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
i would call gdalinfo .But i have gdal installed

you could also use cimg.h ( google it )
and write a program

or if "vips" is installed you can call libvips and get the info

Last edited by John VV; 10-11-2009 at 05:05 PM.
 
  


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
How to print a jpeg file AbrahamJose AIX 8 03-03-2008 06:58 PM
error converting jpeg to ai file aeshj Linux - General 3 10-16-2007 10:28 AM
Reading JPEG Header info lucky6969b Programming 4 06-05-2006 05:12 AM
How to draw the JPEG file into GtkWidget stny Programming 3 04-26-2006 08:14 PM
Why can't imlib fing the jpeg header files? Bert Linux From Scratch 6 05-06-2005 05:30 PM

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

All times are GMT -5. The time now is 03:17 PM.

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