Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image details shown in windows

Status
Not open for further replies.

beedubau

Programmer
Jan 7, 2003
97
AU
In a folder containing images, in Explorer details view, by default a few columns are shown.

However if the column header is right clicked a list of available columns is given for selection of extra columns of information about the image - including some Exif tags and IPTC tags.
At the bottom of the drop-down list is a [More]button giving even more options.

Has anyone any idea of how to access these fields via an API - so that image details can be used in an application?

Thanks

Bryan





 
Hi Mike,

Thanks

Yes I've been doing that stuff but it doesn't give anywhere near the list of all Exif tags that are shown as described above.



Hence my request here.

Regards

Bryan
 
Bryan,

Use the code in the thread as a starting point, but substitute different values for the various EXIF properties. For example, instead of PropertyTagImageTitle shown in the code, you could use PropertyTagExifShutterSpeed, PropertyTagEquipModel and many more.

To get a list of the possible properties (and their numeric equivalents, which is what you need in VFP), look for a copy of GdiplusImaging.H. If you don't already have that file, you can probably download it from Microsoft.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike,

Is this the code you are referring to?

Code:
// Set the image title.
PropertyItem* propItem = new PropertyItem;
CHAR newTitleValue[] = "Fake Photograph 2";

propItem->id = PropertyTagImageTitle;
propItem->length = 18;  //  includes null terminator
propItem->type = PropertyTagTypeASCII;
propItem->value = newTitleValue;

image->SetPropertyItem(propItem);

Is this part of gdiplus?
Can you point me to a starter on a snippet for this code (in VFP form )to get me started please?

Regards

Bryan


 
Bryan,

Yes, that was the code. However, there's some much better examples on Anatoliy Mogylevets's site.

Start by looking at That should give you the general idea. The two functions you need to call are GdipLoadImageFromFile and GdipGetPropertyItem. You can search for them at the above site.

You'll also need the .H file I mentioned earlier. That will give you the values that you need to pass to GdipGetPropertyItem.

In addition, Anatoliy has a class that you can download, that hides most of the details. There should be a link to it at the above URL. I haven't tried it myself.

Hope this helps.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Ilyad,

You're right about the class not being free. However, all the other references I gave for that site are public (not just for members).

That said, I'm sure Cesar's class would be worth looking at.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks Mike and Ilyad.

I tried the cesar code but could not get it to work so I purchased the Example 461.

I am struggling to get anywhere with that but it looks promising

Thanks

Bryan
 
Hi tsh73

Thanks for that - I was aware of and had used that code BUT if you follow my original example there are approx 50 items not 35.

I tried making the array 99 but got no more values.

regards

Bryan

 
Hi Mike,

I ended up buying a 3rd party control to get at the full range of Exif Tags. Unfortunately the one I am interested in is not an Exif but an IPTC - Description. With the above code it shows as Comment and Subject.

I am trying to get the maker to interrogate the IPTC tags as well.

I am struggling to get the correct output from the code Ex 461 using GDIPlus I purchased but am in contact with the author.

Regards
Bryan
 
Bryan,

Lets keep in touch on this. It sounds like you're making more progress than I am, but I am managing to put together an embryo form that will display an image along with many of the EXIF tags.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top