Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!!!

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...