Menu

#3 subscript out of range error

open
nobody
None
5
2005-03-31
2005-03-31
Anonymous
No

Hello

I'm getting a subscript out of range error when there is a
file with no exif date/time tag

other than that the program works great!
thanks
RT

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Here is some more information on the error I'm getting:

    I have the code in a loop. If I check just one image, there is
    no problem.
    If I have more than one image, then the error occurs OR the
    EXIF information from the first file is read as if it were from the
    other files.

    RT

     
  • Nobody/Anonymous

    Logged In: NO

    try with that: search for "If IFDDirectory(i).Tag_No =
    ExifTag Then" add do the following:

    On Error GoTo ErrorHandler ***** add this line
    For i = 1 To UBound(IFDDirectory)
    If IFDDirectory(i).Tag_No = ExifTag Then
    Tag = IFDDirectory(i).Value
    Exit For
    End If
    Next
    ErrorHandler: ***** and also this

    And that's it. Now You will get back an empty objExif.Tag()
    object, and not an error. (I think so)

     
  • enet

    enet - 2005-04-12

    Logged In: YES
    user_id=1257453

    For the code in a loop, here is an example of calling:

    private sub inner(toread as string)
    Dim objExif As New ExifReader
    objExif.Load toread
    'do here what you want with exif stuff
    end sub

    private sub your_code()
    while ... 'your loop
    innner("example.jpg")
    wend

     
  • enet

    enet - 2005-04-12

    Logged In: YES
    user_id=1257453

    I misspelled the word "inner". (So the "innner" is of course
    "inner". Sorry :)

     
  • Timothy Shaw

    Timothy Shaw - 2010-12-03

    I get an error when I get to
    "ReDim Preserve IFDDirectory(1 To NewDimensions) As IFD_Data"
    of
    "Private Sub GetDirectoryEntries(Offset As Long)"
    -Tim.

     

Log in to post a comment.