Calculate height and width of GIF/JPG files(3)On Error Goto EndOfFile ' In case we run over the file for some reason header = Input(2, f) If header = Chr$(255) & Chr$(216) Then' Must start with hex FF D8 foundMarker = False' Look for the marker that will contain the height and width While Not foundMarker header = Input(2, f) ' Grab the next marker ' Look for the marker (in hex) FF C0, FF C1, FF C2, or FF C3 If header = Chr$(255) & Chr$(192) Or header = Chr$(255) & Chr$(193) _ Or header = Chr$(255) & Chr$(194) Or header = Chr$(255) & Chr$(195) Then ' Next two bytes are the length, then a single byte that can be ignored.