Page 1 of 1

Exif Header info in JPGs

Posted: Mon Jan 02, 2012 1:23 am
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)

Re: Exif Header info in JPGs

Posted: Mon Jan 02, 2012 1:18 pm
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 :)

Re: Exif Header info in JPGs

Posted: Mon Jan 02, 2012 8:29 pm
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.

Re: Exif Header info in JPGs

Posted: Mon Jan 02, 2012 8:31 pm
by Tuxedo
Hi!

look at:

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

for a full explaantion on how the Exif Header works :)