Feature Request: gflLoadEXIF

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

User avatar
Ithier
Posts: 47
Joined: Fri Nov 19, 2004 10:50 am
Location: Paris, France

Feature Request: gflLoadEXIF

Post by Ithier »

You have a function to load IPTC data without loading the entire file (gflLoadIPTC), it would be great to have the same for EXIF data, something like: gflLoadEXIF.
This function is very useful in conjunction with the gflJpegLosslessTransform function. So first you determine how to rotate and then you rotate your image with loss.


Thank you very much in advance.
Keep up the good work Pierre!
User avatar
xnview
Author of XnView
Posts: 45053
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Feature Request: gflLoadEXIF

Post by xnview »

Ithier wrote:You have a function to load IPTC data without loading the entire file (gflLoadIPTC), it would be great to have the same for EXIF data, something like: gflLoadEXIF.
This function is very useful in conjunction with the gflJpegLosslessTransform function. So first you determine how to rotate and then you rotate your image with loss.
You'll have it on next release.
Pierre.
User avatar
Ithier
Posts: 47
Joined: Fri Nov 19, 2004 10:50 am
Location: Paris, France

Re: Feature Request: gflLoadEXIF

Post by Ithier »

xnview wrote: You'll have it on next release.
Thank you very much, you are the best !! :P
kurka666
Posts: 47
Joined: Thu Mar 10, 2005 11:41 am

Post by kurka666 »

Hi

Just wanted to check the status. I will find a gflLoadEXIF function very useful! :-)

My application will load both IPTC and EXIF. Maybe a combined function will be even faster! (gflLoadIPTCandEXIF)

Henrik
zapp

Post by zapp »

Yes, loading exif & iptc without loading bitmap is a great idea. When will the next release be? ;-)

ZZzz
User avatar
xnview
Author of XnView
Posts: 45053
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

zapp wrote:Yes, loading exif & iptc without loading bitmap is a great idea. When will the next release be? ;-)
Yes, i'm late (with XnView), i'll release GFLSDK asap.
Pierre.
lazerfisk
Posts: 17
Joined: Wed May 05, 2004 3:00 pm
Location: Karlstad, Sweden

Post by lazerfisk »

Will this feature be available in gflax as well?

Cheers,
Christopher
User avatar
xnview
Author of XnView
Posts: 45053
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

lazerfisk wrote:Will this feature be available in gflax as well?
Currently there is only EXIFDateTaken, but you would like to retrieve all EXIF tags?
Pierre.
lazerfisk
Posts: 17
Joined: Wed May 05, 2004 3:00 pm
Location: Karlstad, Sweden

Post by lazerfisk »

xnview wrote:
lazerfisk wrote:Will this feature be available in gflax as well?
Currently there is only EXIFDateTaken, but you would like to retrieve all EXIF tags?
Yes :) What i would like is something similar to pure ASP EXIF except embedded in GflAx :)

Cheers,
Christopher
User avatar
xnview
Author of XnView
Posts: 45053
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

lazerfisk wrote:
xnview wrote:
lazerfisk wrote:Will this feature be available in gflax as well?
Currently there is only EXIFDateTaken, but you would like to retrieve all EXIF tags?
Yes :) What i would like is something similar to pure ASP EXIF except embedded in GflAx :)
Do you have an example script to show how it works?
Pierre.
lazerfisk
Posts: 17
Joined: Wed May 05, 2004 3:00 pm
Location: Karlstad, Sweden

Post by lazerfisk »

xnview wrote:
lazerfisk wrote:
xnview wrote: Currently there is only EXIFDateTaken, but you would like to retrieve all EXIF tags?
Yes :) What i would like is something similar to pure ASP EXIF except embedded in GflAx :)
Do you have an example script to show how it works?
well, Pure ASP EXIF is downloadable from that website. But, what i would like to see is the feature to retrieve EXIF data in a similar way that is demonstrated on that site. I guess the following should be in there:
  • Ability to get tag by index (for the purpose of enumerating)
  • Ability to get tag by hex tag id
  • Ability to get tag by name (i.e. get the tag based on what getExifName would return, the same thing but backwards)
  • getExifName() to return a friendly name of the tag (e.g. getExifDescription(&H9207) should return "Metering Mode")
  • getExifRaw() to return the raw value (e.g. getExifRaw(&H9207) should return "5")
  • getExifValue() to return the interpreted value (e.g. getExifValue(&H9207) should return "Multi-segment")
Perhaps you could group them in a sub-object?

Code: Select all

sMeteringMode = gfl.exif.getByName("Metering Mode").Value
sThirdValueRaw = gfl.exif.getByIndex(3).Raw
iValueCount = gfl.exif.count
The example code from the Pure ASP EXIF looks like this:

Code: Select all

Date Time: <%= getDateTime(IFDDirectory) %><br>
Exif Image Width: <%= GetExifByName(IFDDirectory, "Exif Image Width", false) %><br>
Exif Image Height: <%= GetExifByName(IFDDirectory, "Exif Image Height", false) %><br>
FStop: <%=getFStop(IFDDirectory)%><br>
Shutter: <%=getShutterSpeed(IFDDirectory, true)%>s<br>
Focal Length: <%=getFocalLength(IFDDirectory)%>mm<br>
<br>
<table border=1>
	<tr>
		<th nowrap>IFD #</td>
		<th nowrap>#</td>
		<th nowrap>Tag HEX</td>
		<th nowrap>Tag Name</td>
		<th nowrap>Format</td>
		<th nowrap>Size</td>
		<th nowrap>Offset</td>
		<th nowrap>Value</td>
		<th nowrap>Value Described</td>
	</tr>
<%
'show all tags in current images metadata
for x = 0 to ubound(IFDDirectory)
	response.write "<tr>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_IFD_No) & "</td>"
	response.write "<td>" & x & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_Tag_No) & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_Tag_Name) & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_Data_Format) & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_Components) & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_OffsetToValue) & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_Value) & "</td>"
	response.write "<td>" & IFDDirectory(x)(IFD_IDX_Value_Desc) & "</td></tr>"
next
But, i leave the implementation issues to you :) You have done such a great work with the rest of GflAx :)

Cheers,
Christopher