-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFJPEGComment.frm
127 lines (118 loc) · 3.35 KB
/
FJPEGComment.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "Comdlg32.ocx"
Begin VB.Form FJPEGComment
Caption = "Jpeg Comment"
ClientHeight = 2370
ClientLeft = 60
ClientTop = 345
ClientWidth = 6390
LinkTopic = "Form1"
ScaleHeight = 2370
ScaleWidth = 6390
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdWriteJpegInfo
Caption = "Write Jpeg Info"
Height = 375
Left = 4680
TabIndex = 6
Top = 1800
Width = 1455
End
Begin MSComDlg.CommonDialog cmDial
Left = 120
Top = 2160
_ExtentX = 847
_ExtentY = 847
_Version = 327680
End
Begin VB.CommandButton cmdOpen
Caption = "..."
Height = 375
Left = 5640
TabIndex = 5
Top = 480
Width = 495
End
Begin VB.TextBox txtFileName
Height = 285
Left = 720
TabIndex = 3
Top = 480
Width = 4695
End
Begin VB.CommandButton cmdReadJpegInfo
Caption = "Read Jpeg Info"
Height = 375
Left = 3000
TabIndex = 2
Top = 1800
Width = 1455
End
Begin VB.TextBox txtComment
Height = 735
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 960
Width = 6015
End
Begin VB.CheckBox ChkVerbose
Caption = "Image info"
Height = 255
Left = 120
TabIndex = 0
Top = 1800
Width = 1215
End
Begin VB.Label Label1
Caption = "File :"
Height = 255
Left = 240
TabIndex = 4
Top = 480
Width = 615
End
End
Attribute VB_Name = "FJPEGComment"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private strFileName As String
Private Sub cmdOpen_Click()
cmDial.Filter = "Jpeg Images (*.jpg;*.jpeg)|*.jpg;*.jpeg"
cmDial.ShowOpen
txtFileName.Text = cmDial.fileName
End Sub
Private Sub cmdReadJpegInfo_Click()
strFileName = txtFileName.Text
If strFileName = "" Then
MsgBox "Select File first!", vbCritical
Exit Sub
End If
If Dir(strFileName) = "" Then
MsgBox "File not found!", vbCritical
Exit Sub
End If
txtComment.Text = scan_JPEG_header(strFileName, ChkVerbose.Value)
End Sub
Private Sub cmdWriteJpegInfo_Click()
strFileName = txtFileName.Text
If strFileName = "" Then
MsgBox "Select File first!", vbCritical
Exit Sub
End If
If Dir(strFileName) = "" Then
MsgBox "File not found!", vbCritical
Exit Sub
End If
Screen.MousePointer = vbHourglass
WriteJPGComment strFileName, txtComment.Text
'Like wrjpgcom.c - but it does not work, maybe I've omitted something
'write_JPEG_header strFileName, txtComment.Text
Screen.MousePointer = Normal
End Sub
Private Sub txtFileName_Change()
txtComment.Text = ""
End Sub