Exif Header info in JPGs

The place for any Hollywood tutorials
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Exif Header info in JPGs

Post by djrikki »

FAO: Tuxedo

So you are doing something along the lines of this? This works with xExif II.

Code: Select all

OpenFile(1, "Images:snowphotos/dsc00060.jpg")

make$ = ""
model$ = ""
c$ = ""

; Seek through Exif Header - Camera Make
Seek(1,$92)
For Local t = 0 to 31
    c = ReadChr(1)
    c$ = Chr(c)
    If c <> 0
	    make$ = make$ .. c$
	Else
	    Break
	EndIf
Next

; Seek through Exif Header - Camera Model
Seek(1,$b2)
For Local t = 0 to 15
    c = ReadChr(1)
    c$ = Chr(c)
    If c <> 0
	    model$ = model$ .. c$
	Else
	    Break
	EndIf
Next

debugprint("Make: " .. make$ .. "\nModel: " .. model$)
CloseFile(1)
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: Exif Header info in JPGs

Post by Tuxedo »

Hi!
plz consider that english wasnt my native language...
And, why you are looking at fixed positions for Exif datas? You have to look for the exif header and get from it all the OffSets values for reading Exif datas...
You can gave also more than a single IFD(quite always) where the datas was stored...

Look at that sites for more infos:

http://gvsoft.homedns.org/exif/exif-explanation.html

http://www.exif.org/samples.html

http://www.sno.phy.queensu.ca/~phil/exi ... /EXIF.html++

Also look on htat nice web program to see the Exif datas on an image:

http://regex.info/exif.cgi

If you have any new question feel free to ask :)
Simone"Tuxedo"Monsignori, Perugia, ITALY.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Exif Header info in JPGs

Post by djrikki »

Well Tuxedo I was just experminating really trying to work out how in fact you got this information out a JPG - I realise fixed positions aren't gonna work for all JPGs.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: Exif Header info in JPGs

Post by Tuxedo »

Hi!

look at:

http://gvsoft.homedns.org/exif/exif-explanation.html

for a full explaantion on how the Exif Header works :)
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Post Reply