ASP.NET Exif Reader

I'd like to have a function with the image name as parameter that would return the image description.

Source code needed.

I used http://www.spaz.com/mr/work/aspexiffuncs/ with coe bleow but cannot think of converting this to .NET.

Thanks
GetExifByTag(IFDDirectory, "010E", false)

Open in new window

latzaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PlatoConsultantCommented:
EXIFextractor library to extract EXIF information


http://www.codeproject.com/KB/graphics/exifextractor.aspx
0
RameshSCommented:
Try the following link.
Reading, writing and photo metadata
DTools is an open source framework designed to supplement the standard Fx. It ihas some Exif related classes.
You may try to use the BitmapMetadata class in the System.Windows.Media.Imaging namespace.  Check this link.
BitmapMetadata Sample
 
0
entrygCommented:
You can use the .NET library by Renaud Ferret called MetaDataExtractor. More at http://renaud91.free.fr/MetaDataExtractor/
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

vora_bhaumikCommented:
Please check the below link it will show you the demo with code.
http://www.codeproject.com/KB/vb/exif_reader.aspx


0
latzaAuthor Commented:
Thanks for all the good links, they are all in C though, any snippet in VB ? Thanks
0
vora_bhaumikCommented:
you can convert the code using this link.
http://www.developerfusion.com/tools/convert/csharp-to-vb/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
latzaAuthor Commented:
Actually ExifWorks is in VB but call me newbie, what would be the code to retrieve my image exif description ?! Thanks
0
vora_bhaumikCommented:
U can see that function in that above url's zip file. File name is ExifWorks.vb
 Public Function GetBitmap() As System.Drawing.Bitmap
        Return DirectCast(Me._Image.Clone(), System.Drawing.Bitmap)
    End Function
0
vora_bhaumikCommented:
Hi i had also attached file you can check from that.
ExifWorks.vb
Module1.vb
ExifWorksSample.vbproj
0
latzaAuthor Commented:
Thanks, I converted the project and everything but how can I pass my image path as parameter to the function which will retrieve my image description ? Thanks (sorry I'm a bit confused here..)
0
vora_bhaumikCommented:
is it working fine now.. Or any more issue is coming ??

Thanks,
Bhaumik
0
latzaAuthor Commented:
I'm still clueless as of what would be the code to show the image description when I pass a specific image path...Thanks
0
vora_bhaumikCommented:
Public Property Description() As String
        Get
            Return Me.GetPropertyString(TagNames.ImageDescription)
        End Get
        Set(ByVal Value As String)
            Try
                Me.SetPropertyString(TagNames.ImageDescription, Value)
            Catch ex As Exception
            End Try
        End Set
    End Property
0
latzaAuthor Commented:
OK that's a property, how do I declare my image then ?
0
latzaAuthor Commented:
Any ideas ? Thanks
0
entrygCommented:
Hi Latza, I've checked the files uploaded by vora_bhaumik, and I found that the constructor of ExifWorks class expects the file name as parameter.

So as per your requirement, you need to pass the path of file name as parameter while initializing the ExifWorks class.

I'm attaching small code snippet to get the details. Hope this helps.



Dim fileName as string
'dummy file called abc.jpg you have to replace with actual filename with full path
fileName = "C:\abc.jpg"
Dim exif as New ExifWorks(fileName)
'display full exif output as messagebox
MessageBox.Show(exif.ToString())

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.