Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista music pictures video

Vista - Programatically modifying image metadata

Reply
 
Old 12-07-2006   #1 (permalink)
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]


 
 

Programatically modifying image metadata

This sample code doesn't seem to work:
http://msdn2.microsoft.com/en-US/lib...atawriter.aspx

It executes without error, but modifications to the metadata do not seem to
persist to disk.
Reading the metadata works perfectly, but changes to the metadata just don't
seem to stick.

Does anybody know how can I programmatically modify the metadata for an
image file?

In case it matters, I'm using the release version of Vista 64-bit ultimate.





My System SpecsSystem Spec
Old 12-07-2006   #2 (permalink)
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]


 
 

Re: Programatically modifying image metadata

OK I figured out what's wrong with the sample code.
Apparently you have to call TrySave AFTER setting the metadata instead of
before like they have in the sample.
Also, the SetQuery method didn't work for me very well so I set the KeyWords
property of the Writer instead and that works like a charm.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <Steve@Orr.net> wrote in
message news:C96828D5-5AFB-4182-81EE-6B9B9AB3587E@microsoft.com...
> This sample code doesn't seem to work:
> http://msdn2.microsoft.com/en-US/lib...atawriter.aspx
>
> It executes without error, but modifications to the metadata do not seem
> to persist to disk.
> Reading the metadata works perfectly, but changes to the metadata just
> don't seem to stick.
>
> Does anybody know how can I programmatically modify the metadata for an
> image file?
>
> In case it matters, I'm using the release version of Vista 64-bit
> ultimate.
>
>
>
>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Image metadata format Vista music pictures video
Image metadata format Vista music pictures video
Image metadata format Vista music pictures video
Image metadata format Vista music pictures video
Image metadata format Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46