Rothariger Posted August 12, 2005 Posted August 12, 2005 Hello People... i need help with this... im making a little program that stores the pictures automatically, in a DB, i need a hand with this thing... one field i want to save is the Date Picture Taken of the file, but i dont know how to retrieve it.... some one can give me a hand??? thanks!!! Quote
progload Posted August 13, 2005 Posted August 13, 2005 Rothariger, I assume your wanting to "retrieve" the Date TagID stored in the picture. Something like this: Imports System.Drawing.Imaging ... ... Dim img As Image = Image.FromFile(dlg.FileName) For Each iPI As PropertyItem In img.PropertyItems Select Case iPI.Id Case 306 'PropertyTag DateTime imgDateTime = System.Text.ASCIIEncoding.ASCII.GetString(iPI.Value) Case 36867 'PropertyTag ExifDTOrig imgExifDTOrig = System.Text.ASCIIEncoding.ASCII.GetString(iPI.Value) Case 36868 'PropertyTagExif DTDigitized imgDTDigitized = System.Text.ASCIIEncoding.ASCII.GetString(iPI.Value) End Select ... ... you can find more info here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvb04/html/vb04b15.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingimageclasspropertyitemstopic.asp progload Quote
Rothariger Posted August 13, 2005 Author Posted August 13, 2005 thanks!!! it worked perfectlly!!!! thank you very much! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.