[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

vb.net - show date of picture taken

Posted on 2011-03-01
3
Medium Priority
?
1,801 Views
Last Modified: 2012-05-11
hello there,
I have a photo taken with my canon camera and in details it shows it was taken in June 10th, 2010..
I would like to make a button that can show me that date.. how can I do that?
0
Comment
Question by:XK8ER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 35010657
0
 
LVL 23

Accepted Solution

by:
wdosanjos earned 2000 total points
ID: 35010796
It would be something like this:

        Const DATE_TAKEN As Integer = &H9003
        Dim img As Image = Image.FromFile("C:\IMG00001.jpg")
        Dim dateTaken As String

        If img.PropertyIdList.Contains(DATE_TAKEN) Then
            Dim pitem As PropertyItem
            pitem = img.GetPropertyItem(DATE_TAKEN)
            dateTaken = Encoding.UTF8.GetString(pitem.Value, 0, pitem.Value.Length)
        Else
            dateTaken = "Not available"
        End If

        Console.WriteLine("Date Taken: {0}", dateTaken)

Open in new window


Check the following link for other property codes:
http://msdn.microsoft.com/en-us/library/xddt0dz7.aspx
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 35011032
The CodeProject link I posted basically wraps that into a nice class.

If you follow the link,  click on the "Browse Code" Tab near the top, and select "ExifReader.vb", you can see hundreds more of the tag codes have been entered for you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question