Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 480
  • Last Modified:

FileUpload - exif

I am using Fileupload control in VS2008 and also want to use this Exif dll. I can use Exif no problem. Is there a way  to get Exif info. prior to user upload file. I want to make sure "Make and Model" is in the image before use upload file. http://www.codeproject.com/KB/graphics/exiftagcol.aspx
0
VBdotnet2005
Asked:
VBdotnet2005
1 Solution
 
Kumaraswamy RCommented:
Hi

step 1: Reading EXIF data in ASP with csImageFile
step 2:write EXIF data to JPEGs and TIFFs with csImageFile


example
http://www.chestysoft.com/imagefile/exifread.asp
0
 
VBdotnet2005Author Commented:
step 1: Reading EXIF data in ASP with csImageFile
step 2:write EXIF data to JPEGs and TIFFs with csImageFile



I am not sure what you meant here. I can read exif data fine. However, I don't know how to read exif data before a file is uploaded. I am looking a specific data on photo. Sample, if it is Maker = "Apple", then upload file.
Here is my asp.net code.
       


            myfilename = Me.FileUpload1.PostedFile.FileName
            Dim c As String = System.IO.Path.GetFileName(myfilename)
            nuFile = filename
           
            Dim Imagex As New ManageClass
         
            Imagex.ReadFile(System.IO.Path.GetFileName & myfilename)   <<<<< this give me only filename on the whole path

            For i = 0 To Imagex.ExifCount - 1
                Dim tmp_ = Imagex.ExifName(i) & " :" & Imagex.ExifValueByIndex(i)
            Next

            Me.FileUpload1.PostedFile.SaveAs("c:\test\" & nuFile)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now