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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP6 Writing to an image file in EXIF area

Status
Not open for further replies.

eric43

Programmer
Apr 29, 2005
94
AU
Having spent a few hours going through miscellaneous image files I have collected over the years ( genealogy related) (using the code in a previous posting) I note a number of Properties ( Fields ) which I would like to use to classify my images. I prefer not to use a filename - I use a code for each image.

I would then imagine that I could search amongst my images for particular strings.

Anyone have any interest in getting me started on this?

Thanks again

Eric
 
Hi Olaf

I have found this code snippet in C on MSDN which I'm sure could be re written in VFP.This allows a Title change which is what I want.

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);

However I dont have the skills. Is it too much to ask for a little more help?

I envisage a command button on the data field in the grid which, when clicked, would test for say three types of Property which one might like to change and then make the change if the types are valid. I can handle all that but not the conversion.

Many thanks

Eric
 
Well, maybe next week. In principle all you need to do is take the code to GET the EXIF informations you already have and change it to use SET methods/functions. You may need to create several methods, eg additional to GetMemString you need SetMemString and additional to buf2num you'd need num2buf...

In general the changes are as simple as changing
Code:
output = property
to
Code:
property = input

Bye, Olaf.
 

AFAIK the current version of GDI does not allow changes of image properties, but only allows to save the image under a new name with the properties changed.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top