home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form MainForm
- BorderStyle = 3 'Fixed Dialog
- Caption = "ImageLib 3.1 Example"
- ClientHeight = 6180
- ClientLeft = 300
- ClientTop = 1140
- ClientWidth = 8745
- ForeColor = &H80000008&
- Height = 6585
- Icon = "MAINFORM.frx":0000
- Left = 240
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6180
- ScaleWidth = 8745
- Top = 795
- Width = 8865
- Begin VB.PictureBox Picture_B_Aquire
- AutoSize = -1 'True
- Height = 645
- Index = 3
- Left = 10680
- Picture = "MAINFORM.frx":030A
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 89
- Top = 2640
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Aquire
- AutoSize = -1 'True
- Height = 645
- Index = 2
- Left = 10440
- Picture = "MAINFORM.frx":208C
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 88
- Top = 2640
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Aquire
- AutoSize = -1 'True
- Height = 645
- Index = 1
- Left = 10200
- Picture = "MAINFORM.frx":3E0E
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 87
- Top = 2640
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Select
- AutoSize = -1 'True
- Height = 645
- Index = 3
- Left = 10680
- Picture = "MAINFORM.frx":5B90
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 86
- Top = 2040
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Select
- AutoSize = -1 'True
- Height = 645
- Index = 2
- Left = 10440
- Picture = "MAINFORM.frx":7912
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 85
- Top = 2040
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Select
- AutoSize = -1 'True
- Height = 645
- Index = 1
- Left = 10200
- Picture = "MAINFORM.frx":9694
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 84
- Top = 2040
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Setup
- AutoSize = -1 'True
- Height = 645
- Index = 3
- Left = 10680
- Picture = "MAINFORM.frx":B416
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 83
- Top = 1440
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Setup
- AutoSize = -1 'True
- Height = 645
- Index = 2
- Left = 10440
- Picture = "MAINFORM.frx":D198
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 82
- Top = 1440
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Setup
- AutoSize = -1 'True
- Height = 645
- Index = 1
- Left = 10200
- Picture = "MAINFORM.frx":EF1A
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 81
- Top = 1440
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Save
- AutoSize = -1 'True
- Height = 645
- Index = 3
- Left = 10680
- Picture = "MAINFORM.frx":10C9C
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 80
- Top = 840
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Save
- AutoSize = -1 'True
- Height = 660
- Index = 2
- Left = 10440
- Picture = "MAINFORM.frx":12A1E
- ScaleHeight = 600
- ScaleWidth = 945
- TabIndex = 79
- Top = 840
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Save
- AutoSize = -1 'True
- Height = 660
- Index = 1
- Left = 10200
- Picture = "MAINFORM.frx":14860
- ScaleHeight = 600
- ScaleWidth = 945
- TabIndex = 78
- Top = 840
- Width = 1005
- End
- Begin VB.PictureBox PICTURE_B_LOAD
- AutoSize = -1 'True
- Height = 645
- Index = 3
- Left = 10680
- Picture = "MAINFORM.frx":166A2
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 77
- Top = 240
- Width = 1005
- End
- Begin VB.PictureBox PICTURE_B_LOAD
- AutoSize = -1 'True
- Height = 645
- Index = 2
- Left = 10440
- Picture = "MAINFORM.frx":18424
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 76
- Top = 240
- Width = 1005
- End
- Begin VB.PictureBox PICTURE_B_LOAD
- AutoSize = -1 'True
- Height = 660
- Index = 1
- Left = 10200
- Picture = "MAINFORM.frx":1A1A6
- ScaleHeight = 600
- ScaleWidth = 945
- TabIndex = 75
- Top = 240
- Width = 1005
- End
- Begin VB.Frame Frame_SETUP
- Caption = "SETUP"
- Height = 2895
- Left = 480
- TabIndex = 21
- Top = 960
- Visible = 0 'False
- Width = 7935
- Begin VB.CommandButton COMMAND_SETUP_OK
- Caption = "OK"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 600
- TabIndex = 58
- Top = 1680
- Width = 975
- End
- Begin VB.ListBox LIST_SELECT
- Height = 645
- ItemData = "MAINFORM.frx":1BFE8
- Left = 120
- List = "MAINFORM.frx":1BFF5
- TabIndex = 25
- Top = 720
- Width = 2055
- End
- Begin VB.Frame Frame_SU_Panel
- Caption = "Other Options"
- ForeColor = &H00FF0000&
- Height = 975
- Index = 2
- Left = 2280
- TabIndex = 24
- Top = 120
- Visible = 0 'False
- Width = 4695
- Begin VB.CheckBox Check_SaveSettingsOnOK
- Caption = "Save Settings on OK"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 12
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 120
- TabIndex = 91
- Top = 600
- Value = 1 'Checked
- Width = 2775
- End
- Begin VB.CheckBox Check_ShowErrorDialogs
- Caption = "Display Error Dialogs"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 12
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 120
- TabIndex = 90
- Top = 240
- Width = 2655
- End
- End
- Begin VB.Frame Frame_SU_Panel
- Caption = "Image Save Options"
- ForeColor = &H00FF0000&
- Height = 2535
- Index = 1
- Left = 2280
- TabIndex = 23
- Top = 120
- Visible = 0 'False
- Width = 5535
- Begin VB.Frame Frame1
- Caption = "TIFF Compression"
- Height = 1335
- Left = 3480
- TabIndex = 53
- Top = 240
- Width = 1695
- Begin VB.OptionButton Option_TIFF_Compression
- Caption = "Packbits"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 57
- Top = 960
- Width = 975
- End
- Begin VB.OptionButton Option_TIFF_Compression
- Caption = "LZW"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 56
- Top = 720
- Width = 735
- End
- Begin VB.OptionButton Option_TIFF_Compression
- Caption = "CCITT"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 55
- Top = 480
- Width = 855
- End
- Begin VB.OptionButton Option_TIFF_Compression
- Caption = "None"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 54
- Top = 240
- Value = -1 'True
- Width = 735
- End
- End
- Begin VB.CheckBox Check2
- Caption = "PNG Interlaced"
- Height = 255
- Left = 3480
- TabIndex = 51
- Top = 2040
- Width = 1415
- End
- Begin VB.VScrollBar VS_Smooth
- Height = 375
- Left = 2760
- Max = 100
- TabIndex = 49
- Top = 2040
- Value = 100
- Width = 255
- End
- Begin VB.TextBox TB_Smooth
- Height = 375
- Left = 2280
- Locked = -1 'True
- TabIndex = 48
- Top = 2040
- Width = 495
- End
- Begin VB.VScrollBar VS_Quality
- Height = 375
- Left = 1200
- Max = 100
- TabIndex = 45
- Top = 2040
- Value = 75
- Width = 255
- End
- Begin VB.TextBox TB_Quality
- Height = 375
- Left = 720
- Locked = -1 'True
- TabIndex = 44
- Top = 2040
- Width = 495
- End
- Begin VB.Frame Frame7
- Caption = "Resolution"
- Height = 1575
- Left = 120
- TabIndex = 38
- Top = 240
- Width = 3135
- Begin VB.OptionButton OPTION_W_Resolution
- Caption = "24 Bit ( 16.7 Million Colors )"
- Height = 255
- Index = 4
- Left = 120
- TabIndex = 43
- Top = 1200
- Width = 2295
- End
- Begin VB.OptionButton OPTION_W_Resolution
- Caption = "8 Bit ( 256 Colors )"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 42
- Top = 960
- Value = -1 'True
- Width = 2295
- End
- Begin VB.OptionButton OPTION_W_Resolution
- Caption = "4 Bit ( 16 Colors )"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 41
- Top = 720
- Width = 2295
- End
- Begin VB.OptionButton OPTION_W_Resolution
- Caption = "4 Bit ( 16 Colors Using VGA Palette )"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 40
- Top = 480
- Width = 2895
- End
- Begin VB.OptionButton OPTION_W_Resolution
- Caption = "1 Bit ( Monochrome )"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 39
- Top = 240
- Width = 2295
- End
- End
- Begin VB.Line Line1
- BorderColor = &H00808080&
- X1 = 3480
- X2 = 5160
- Y1 = 1800
- Y2 = 1800
- End
- Begin VB.Label Label11
- Caption = "<- JPEG ->"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = -1 'True
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1320
- TabIndex = 50
- Top = 1800
- Width = 855
- End
- Begin VB.Label Label13
- Caption = "Smooth"
- Height = 255
- Left = 1680
- TabIndex = 47
- Top = 2040
- Width = 615
- End
- Begin VB.Label Label12
- Caption = "Quality"
- Height = 255
- Left = 120
- TabIndex = 46
- Top = 2040
- Width = 615
- End
- End
- Begin VB.Frame Frame_SU_Panel
- Caption = "Image Load Options"
- ForeColor = &H00FF0000&
- Height = 2535
- Index = 0
- Left = 2280
- TabIndex = 22
- Top = 120
- Width = 5535
- Begin VB.Frame Frame6
- Caption = "JPEG Scale"
- Height = 1215
- Left = 3480
- TabIndex = 28
- Top = 240
- Width = 1935
- Begin VB.OptionButton OPTION_Scale
- Caption = "1/8 Size"
- Height = 195
- Index = 3
- Left = 120
- TabIndex = 37
- Top = 960
- Width = 975
- End
- Begin VB.OptionButton OPTION_Scale
- Caption = "1/4 Size"
- Height = 195
- Index = 2
- Left = 120
- TabIndex = 36
- Top = 720
- Width = 975
- End
- Begin VB.OptionButton OPTION_Scale
- Caption = "1/2 Size"
- Height = 195
- Index = 1
- Left = 120
- TabIndex = 35
- Top = 480
- Width = 975
- End
- Begin VB.OptionButton OPTION_Scale
- Caption = "1/1 Normal Size"
- Height = 195
- Index = 0
- Left = 120
- TabIndex = 34
- Top = 240
- Value = -1 'True
- Width = 1455
- End
- End
- Begin VB.Frame Frame5
- Caption = "Resolution"
- Height = 1935
- Left = 120
- TabIndex = 27
- Top = 240
- Width = 3255
- Begin VB.CheckBox Check1
- Caption = "Dither"
- Height = 255
- Left = 120
- TabIndex = 52
- Top = 1560
- Value = 1 'Checked
- Width = 1415
- End
- Begin VB.OptionButton OPTION_R_Resolution
- Caption = "24 Bit ( 16.7 Million Colors)"
- Height = 255
- Index = 4
- Left = 120
- TabIndex = 33
- Top = 1200
- Width = 2175
- End
- Begin VB.OptionButton OPTION_R_Resolution
- Caption = "8 Bit ( 256 Colors )"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 32
- Top = 960
- Value = -1 'True
- Width = 1695
- End
- Begin VB.OptionButton OPTION_R_Resolution
- Caption = "4 Bit ( 16 Colors )"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 31
- Top = 720
- Width = 1575
- End
- Begin VB.OptionButton OPTION_R_Resolution
- Caption = "4 Bit ( 16 Colors Using VGA Palette )"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 30
- Top = 480
- Width = 2895
- End
- Begin VB.OptionButton OPTION_R_Resolution
- Caption = "1 Bit ( Monochrome )"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 29
- Top = 240
- Width = 1935
- End
- End
- End
- Begin VB.Line Line2
- BorderColor = &H00404040&
- BorderWidth = 3
- Index = 3
- X1 = 7920
- X2 = 7920
- Y1 = 0
- Y2 = 2880
- End
- Begin VB.Line Line2
- BorderColor = &H00808080&
- BorderWidth = 3
- Index = 2
- X1 = 0
- X2 = 0
- Y1 = 0
- Y2 = 2880
- End
- Begin VB.Line Line2
- BorderColor = &H00808080&
- BorderWidth = 3
- Index = 1
- X1 = 0
- X2 = 7920
- Y1 = 0
- Y2 = 0
- End
- Begin VB.Line Line2
- BorderColor = &H00404040&
- BorderWidth = 3
- Index = 0
- X1 = 0
- X2 = 7920
- Y1 = 2880
- Y2 = 2880
- End
- Begin VB.Label Label14
- Caption = "Configure"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 13.5
- underline = 0 'False
- italic = -1 'True
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 120
- TabIndex = 26
- Top = 240
- Width = 1575
- End
- End
- Begin VB.PictureBox Picture_B_Aquire
- AutoSize = -1 'True
- Height = 645
- Index = 0
- Left = 7680
- Picture = "MAINFORM.frx":1C030
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 74
- Top = 2640
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Select
- AutoSize = -1 'True
- Height = 645
- Index = 0
- Left = 7680
- Picture = "MAINFORM.frx":1DDB2
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 73
- Top = 2040
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Setup
- AutoSize = -1 'True
- Height = 645
- Index = 0
- Left = 7680
- Picture = "MAINFORM.frx":1FB34
- ScaleHeight = 585
- ScaleWidth = 945
- TabIndex = 72
- Top = 1440
- Width = 1005
- End
- Begin VB.PictureBox Picture_B_Save
- AutoSize = -1 'True
- Height = 660
- Index = 0
- Left = 7680
- Picture = "MAINFORM.frx":218B6
- ScaleHeight = 600
- ScaleWidth = 945
- TabIndex = 71
- Top = 840
- Width = 1005
- End
- Begin VB.PictureBox PICTURE_B_LOAD
- AutoSize = -1 'True
- Height = 660
- Index = 0
- Left = 7680
- Picture = "MAINFORM.frx":236F8
- ScaleHeight = 600
- ScaleWidth = 945
- TabIndex = 70
- Top = 240
- Width = 1005
- End
- Begin VB.Frame Frame2
- Caption = "Image"
- Height = 3375
- Left = 6000
- TabIndex = 59
- Top = 120
- Width = 1575
- Begin VB.TextBox TEXT_II
- BackColor = &H00800000&
- Enabled = 0 'False
- ForeColor = &H00FFFFFF&
- Height = 285
- Index = 4
- Left = 240
- TabIndex = 69
- Top = 2880
- Width = 1095
- End
- Begin VB.TextBox TEXT_II
- BackColor = &H00800000&
- Enabled = 0 'False
- ForeColor = &H00FFFFFF&
- Height = 285
- Index = 3
- Left = 240
- TabIndex = 67
- Top = 2280
- Width = 1095
- End
- Begin VB.TextBox TEXT_II
- BackColor = &H00800000&
- Enabled = 0 'False
- ForeColor = &H00FFFFFF&
- Height = 285
- Index = 2
- Left = 240
- TabIndex = 65
- Top = 1680
- Width = 1095
- End
- Begin VB.TextBox TEXT_II
- BackColor = &H00800000&
- Enabled = 0 'False
- ForeColor = &H00FFFFFF&
- Height = 285
- Index = 1
- Left = 240
- TabIndex = 63
- Top = 1080
- Width = 1095
- End
- Begin VB.TextBox TEXT_II
- BackColor = &H00800000&
- Enabled = 0 'False
- ForeColor = &H00FFFFFF&
- Height = 285
- Index = 0
- Left = 240
- TabIndex = 61
- Top = 480
- Width = 1095
- End
- Begin VB.Label Label19
- Caption = "Number Of Colors:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = -1 'True
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 68
- Top = 2640
- Width = 1335
- End
- Begin VB.Label Label18
- Caption = "Planes:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = -1 'True
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 66
- Top = 2040
- Width = 615
- End
- Begin VB.Label Label17
- Caption = "Bits Per Pixel:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = -1 'True
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 64
- Top = 1440
- Width = 1095
- End
- Begin VB.Label Label16
- Caption = "Height:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = -1 'True
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 62
- Top = 840
- Width = 735
- End
- Begin VB.Label Label15
- Caption = "Width:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = -1 'True
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 60
- Top = 240
- Width = 615
- End
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 100
- Left = 9000
- Top = 3480
- End
- Begin VB.Frame Frame_Opts
- Height = 255
- Left = 0
- TabIndex = 15
- Top = 0
- Width = 6015
- Begin VB.OptionButton OptShow
- Caption = "Fit To Window"
- Height = 255
- Index = 3
- Left = 4560
- TabIndex = 20
- Top = 0
- Width = 1455
- End
- Begin VB.OptionButton OptShow
- Caption = "Only to enlarge"
- Height = 255
- Index = 2
- Left = 3120
- TabIndex = 19
- Top = 0
- Width = 1455
- End
- Begin VB.OptionButton OptShow
- Caption = "Only to shrink"
- Height = 255
- Index = 1
- Left = 1800
- TabIndex = 18
- Top = 0
- Width = 1335
- End
- Begin VB.OptionButton OptShow
- Caption = "None"
- Height = 255
- Index = 0
- Left = 1080
- TabIndex = 17
- Top = 0
- Value = -1 'True
- Width = 975
- End
- Begin VB.Label Label10
- Caption = "Size Mode:"
- Height = 255
- Left = 0
- TabIndex = 16
- Top = 0
- Width = 1095
- End
- End
- Begin VB.VScrollBar VS_Image
- Height = 5055
- Left = 5640
- TabIndex = 14
- Top = 240
- Visible = 0 'False
- Width = 255
- End
- Begin VB.HScrollBar HS_Image
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 5280
- Visible = 0 'False
- Width = 5535
- End
- Begin VB.CommandButton cmdExit
- Caption = "E&xit"
- Height = 375
- Left = 7800
- TabIndex = 1
- Top = 5700
- Width = 735
- End
- Begin VB.Frame Frame4
- Height = 590
- Left = 120
- TabIndex = 10
- Top = 5550
- Width = 8535
- Begin VB.Label Label9
- Caption = "Technical Support: Kevin Adams, 74742.1444@CompuServe.Com"
- Height = 375
- Left = 3360
- TabIndex = 12
- Top = 130
- Width = 2415
- End
- Begin VB.Label Label8
- Caption = "Technical Support: Jan Dekkers 72130.353@CompuServe.Com"
- Height = 375
- Left = 120
- TabIndex = 11
- Top = 130
- Width = 2295
- End
- End
- Begin VB.Frame Frame3
- ClipControls = 0 'False
- Height = 2055
- Left = 5925
- TabIndex = 2
- Top = 3480
- Width = 2775
- Begin VB.Label Label7
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- Caption = "ImageLib is royalty free"
- BeginProperty Font
- name = "Arial"
- charset = 1
- weight = 700
- size = 9
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00808000&
- Height = 225
- Left = 120
- TabIndex = 9
- Top = 1800
- Width = 2535
- End
- Begin VB.Label Label6
- Alignment = 2 'Center
- Caption = "(818) 766-3900"
- Height = 255
- Left = 180
- TabIndex = 8
- Top = 1560
- Width = 2415
- End
- Begin VB.Label Label5
- Alignment = 2 'Center
- Caption = "1-800 404-3832"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 375
- Left = 240
- TabIndex = 7
- Top = 1180
- Width = 2295
- End
- Begin VB.Label Label4
- Alignment = 2 'Center
- Caption = "To order call"
- Height = 255
- Left = 120
- TabIndex = 6
- Top = 960
- Width = 2415
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "Copyright by SkyLine Tools 1995"
- Height = 255
- Left = 180
- TabIndex = 5
- Top = 720
- Width = 2415
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Caption = "16 Bit Version"
- Height = 255
- Left = 840
- TabIndex = 4
- Top = 480
- Width = 1095
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "ImageLib 3.0 Professional Edition"
- Height = 255
- Left = 160
- TabIndex = 3
- Top = 240
- Width = 2415
- End
- End
- Begin VB.PictureBox Picture1
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 5295
- Left = 120
- MouseIcon = "MAINFORM.frx":2553A
- ScaleHeight = 5235
- ScaleWidth = 5715
- TabIndex = 0
- Top = 240
- Width = 5775
- End
- Begin VB.Shape Shape1
- Height = 495
- Left = 3720
- Top = 2880
- Width = 1215
- End
- Begin MSComDlg.CommonDialog CMDialog1
- Left = 120
- Top = 120
- _version = 65536
- _extentx = 847
- _extenty = 847
- _stockprops = 0
- End
- Attribute VB_Name = "MainForm"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Dim r As Integer
- Dim hdib As Integer
- Dim hddb As Integer
- Dim hpal As Integer
- Dim BMINFO As BITMAP
- Dim Filename As String
- Dim ReadResolution As Integer
- Dim ReadScale As Integer
- Dim WriteResolution As Integer
- Dim bPNGInterlaced As Integer
- Dim Compression As Long
- Dim ReadDither As Integer
- Dim JpegSaveQuality As Integer
- Dim JpegSaveSmooth As Integer
- Dim DisplayOption As Integer
- Dim TiffStripSize As Integer
- Dim ConfigData As ConfigRecord
- Dim DevBPP As Integer
- Dim hTempDC As Integer
- Dim RDR As RedrawRecord
- ' Start-up Picture Control Info
- Dim P_ctl_X%
- Dim P_ctl_Y%
- Dim P_ctl_width%
- Dim P_ctl_height%
- Dim I_X%
- Dim I_Y%
- Dim I_Width%
- Dim I_Height%
- Dim I_Resize_Method%
- Dim bDebug%
- Dim Form_Caption$
- Function FileExists(F$) As Integer
- CF% = FreeFile
- On Error GoTo FileError
- Open F$ For Input As CF%
- Close CF%
- FileExists = True
- Exit Function
- FileError:
- On Error GoTo 0
- FileExists = False
- End Function
- Function LoadConfig() As Integer
- NA$ = App.Path + "\" + App.EXEName + ".CFG"
- If Not FileExists(NA$) Then
- LoadConfig = False
- Exit Function
- End If
- SF% = FreeFile
- Open NA$ For Binary As SF% Len = Len(ConfigData)
- Get #SF%, , ConfigData
- Close SF%
- LoadConfig = True
- ReadResolution = ConfigData.ReadResolution
- ReadScale = ConfigData.ReadScale
- WriteResolution = ConfigData.WriteResolution
- bPNGInterlaced = ConfigData.bPNGInterlaced
- Compression = ConfigData.Compression
- ReadDither = ConfigData.ReadDither
- JpegSaveQuality = ConfigData.JpegSaveQuality
- JpegSaveSmooth = ConfigData.JpegSaveSmooth
- I_Resize_Method% = ConfigData.DisplayOption
- bDebug% = ConfigData.bDebug
- End Function
- Sub EnableButton_Aquire(bEnable As Integer)
- If bEnable Then
- P% = 1
- Else
- P% = 3
- End If
- Picture_B_Aquire(0).Picture = Picture_B_Aquire(P%).Picture
- Picture_B_Aquire(0).Enabled = bEnable
- End Sub
- Function DrawDIB(bInit%) As Integer
- Dim iOldBMP As Integer
- Dim iOldPAL As Integer
- Pixel_W% = Picture1.ScaleX(P_ctl_width, Picture1.ScaleMode, 3)
- Pixel_H% = Picture1.ScaleY(P_ctl_height, Picture1.ScaleMode, 3)
- I_Width% = Pixel_W%
- I_Height% = Pixel_H%
- bNormal% = False
- If hddb = 0 Then Exit Function
- If bInit% Then
- I_X% = 0
- I_Y% = 0
- HS_Image.Visible = False
- VS_Image.Visible = False
- Picture1.Height = P_ctl_height%
- Picture1.Width = P_ctl_width%
-
- Select Case (I_Resize_Method%)
- Case 0: ' Normal
- bNormal% = True
- Case 1, 2: ' To Shrink/Enlarge
- I_Denom% = BMINFO.bmWidth ' Use Largest For Ratio
- If BMINFO.bmHeight > I_Denom% Then I_Denom% = BMINFO.bmHeight
-
- P_Denom% = Pixel_W% ' Use Perfect Square
- If Pixel_H% < P_Denom% Then P_Denom% = Pixel_H%
-
- If (I_Resize_Method% = 1 And I_Denom% > P_Denom%) Or (I_Resize_Method = 2 And I_Denom% < P_Denom%) Then
- I_Width% = P_Denom% * (BMINFO.bmWidth / I_Denom%)
- I_Height% = P_Denom% * (BMINFO.bmHeight / I_Denom%)
- bNormal% = False
- Else
- bNormal% = True
- End If
-
- End Select
- Else
- I_Denom% = BMINFO.bmWidth ' Use Largest For Ratio
- If BMINFO.bmHeight > I_Denom% Then I_Denom% = BMINFO.bmHeight
-
- P_Denom% = Pixel_W% ' Use Perfect Square
- If Pixel_H% < P_Denom% Then P_Denom% = Pixel_H%
- If (I_Resize_Method% = 1 And I_Denom% > P_Denom%) Or (I_Resize_Method% = 2 And I_Denom% < P_Denom%) Then
- bNormal% = False
- Else
- bNormal% = True
- End If
- End If
-
- 'hTempBMP = CreateDiscardableBitmap(Picture1.hdc, Pixel_W%, Pixel_H%) 'new
- 'iOldPictureBMP% = SelectObject(Picture1.hdc, hTempBMP) ' Select BITMAP Into Picture1
- Picture1.Cls
- iOldBMP = SelectObject(hTempDC, hddb)
- If bInit% And bNormal% Then
- If BMINFO.bmWidth > Pixel_W% Then
- 'SetupHS
- Picture1.Height = P_ctl_height% - HS_Image.Height
- HS_Image.Max = BMINFO.bmWidth - Pixel_W%
- LC% = HS_Image.Max / 5: If LC% < 1 Then LC% = 1
- HS_Image.LargeChange = LC%
- HS_Image.value = 0
- HS_Image.Visible = True
- Else
- HS_Image.Visible = False
- Picture1.Height = P_ctl_height%
- End If
- If BMINFO.bmHeight > Pixel_H% Then
- 'SetupVS
- Picture1.Width = P_ctl_width% - VS_Image.Width
- VS_Image.Max = BMINFO.bmHeight - Pixel_H%
- LC% = VS_Image.Max / 5: If LC% < 1 Then LC% = 1
- VS_Image.LargeChange = LC%
- VS_Image.value = 0
- VS_Image.Visible = True
- Else
- VS_Image.Visible = False
- Picture1.Width = P_ctl_width%
- End If
- End If
- X = SetStretchBltMode(Picture1.hdc, 3)
- If bNormal% Then
- X = BitBlt(Picture1.hdc, -I_X%, -I_Y%, Pixel_W% + I_X%, Pixel_H% + I_Y%, hTempDC, 0, 0, SRCCOPY)
- RDR.X = -I_X%: RDR.Y = -I_Y%: RDR.W = Pixel_W% + I_X%: RDR.H = Pixel_H% + I_Y%
- Else
- X = StretchBlt(Picture1.hdc, 0, 0, I_Width%, I_Height%, hTempDC, 0, 0, BMINFO.bmWidth, BMINFO.bmHeight, SRCCOPY)
- RDR.X = I_Width%: RDR.Y = I_Height%: RDR.W = BMINFO.bmWidth: RDR.H = BMINFO.bmHeight
- End If
- RDR.bNormal = bNormal%
- SetPalette
- End Function
- Sub EnableButton_Select(bEnable As Integer)
- If bEnable Then
- P% = 1
- Else
- P% = 3
- End If
- Picture_B_Select(0).Picture = Picture_B_Select(P%).Picture
- Picture_B_Select(0).Enabled = bEnable
- End Sub
- Function GetFilterString(IType$, F%) As String
- IType$ = LCase$(IType$)
- Ftr$ = ""
- Select Case (IType$)
- Case "jpg": Ftr$ = "JPEG (*.jpg)|*.jpg": F% = 0
- Case "gif": Ftr$ = "GIF (*.gif)|*.gif": F% = 1
- Case "pcx": Ftr$ = "PCX (*.pcx)|*.pcx": F% = 2
- Case "bmp": Ftr$ = "BMP (*.bmp)|*.bmp": F% = 3
- Case "png": Ftr$ = "PNG (*.png)|*.png": F% = 4
- Case "tif": Ftr$ = "TIF (*.tif)|*.tif": F% = 5
- Case Default:
- Ftr$ = "Images (*.jpg;*.gif;*.pcx;*.bmp;*.png;*.tif)|*.jpg;*.gif;*.pcx;*.bmp;*.png;*.tif|JPEG (*.jpg)|*.jpg|GIF (*.gif)|*.gif|PCX (*.pcx)|*.pcx|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|TIF (*.tif)|*.tif": F% = -1
- End Select
- GetFilterString = Ftr$
- End Function
- Function GetImageInfo()
- lbe = GetObjectGDI(hddb, Len(BMINFO), BMINFO)
- Select Case (ReadResolution)
- Case 1: BITSPIX = 2: C$ = "2"
- Case 0: BITSPIX = 4: C$ = "16"
- Case 4: BITSPIX = 4: C$ = "16"
- Case 8: BITSPIX = 8: C$ = "256"
- Case 24: BITSPIX = 24: C$ = "16.7M"
- Case Default:
- BITSPIX = Asc(BMINFO.bmBitsPixel)
- End Select
- X$ = "File: " & Filename$ & ", Width: " & BMINFO.bmWidth & ", Height: " & BMINFO.bmHeight & ", WidthBytes: " & BMINFO.bmWidthBytes & ", Planes: " & Asc(BMINFO.bmPlanes) & ", BitsPixel: " & BITSPIX
- TEXT_II(0).Text = Str$(BMINFO.bmWidth)
- TEXT_II(1).Text = Str$(BMINFO.bmHeight)
- TEXT_II(2).Text = Str$(BITSPIX)
- TEXT_II(3).Text = Str$(Asc(BMINFO.bmPlanes))
- TEXT_II(4).Text = C$
- End Function
- Function LoadImage(IType$) As Integer
- Dim Oldhdib As Integer
- Dim Oldhddb As Integer
- Dim Oldhpal As Integer
- Static ftype As String * 10
- Static fcompression As String * 10
- ValidRes$ = Chr$(1) + Chr$(4) + Chr$(8) + Chr$(24)
- LoadImage = False
- Ftr$ = GetFilterString$(IType$, F%)
- CMDialog1.Filename = ""
- CMDialog1.flags = &H1000&
- CMDialog1.Filter = Ftr$
- CMDialog1.Action = 1
- If CMDialog1.Filename <> "" Then
- Screen.MousePointer = 11
- Oldhdib = hdib: hdib = 0
- Oldhddb = hddb: hddb = 0
- Oldhpal = hpal: hpal = 0
-
- Filename$ = CMDialog1.Filename
-
- ' Abort Function if intended file is invalid
- P% = InStr(Filename$, ".")
- If P% And P% < Len(Filename$) Then
- EXT$ = Mid$(Filename$, P% + 1)
- Ftr$ = GetFilterString$(EXT$, F%)
- Else
- Exit Function
- End If
-
- 'X = fileinfo(Filename$, ftype, fWidth%, fHeight%, fbitspixel%, fPlanes%, fNumColors%, fcompression, 0)
- RR% = ReadResolution
- RRC% = RR%
- If RRC% = 0 Then RRC% = 4
-
- ' Use a valid Resolution <= Device Depth
- ResPos% = InStr(ValidRes$, Chr$(RRC%))
- If RRC% > DevBPP And (DevBPP < 16) Then
- RR% = Asc(Mid$(ValidRes$, ResPos% - 1))
- End If
-
- Select Case (F%)
- Case 0:
- r = readjpgfile(CMDialog1.Filename, RR%, ReadScale, ReadDither, hddb, hpal, 0, bDebug%)
- Case 1:
- r = readgiffile(CMDialog1.Filename, RR%, ReadDither, hddb, hpal, 0, bDebug%)
- Case 2:
- r = readpcxfile(CMDialog1.Filename, RR%, ReadDither, hddb, hpal, 0, bDebug%)
- Case 3:
- r = readbmpfile(CMDialog1.Filename, RR%, ReadDither, hddb, hpal, 0, bDebug%)
- Case 4:
- r = readpngfile(CMDialog1.Filename, RR%, ReadDither, hddb, hpal, 0, bDebug%)
- Case 5:
- r = readtiffile(CMDialog1.Filename, RR%, ReadDither, hddb, hpal, 0, bDebug%)
- End Select
-
- If r > 0 Then
- 'lbe = GetObjectGDI(hddb, Len(BMINFO), BMINFO)
- 'X$ = "File: " & Filename$ & ", Width: " & BMINFO.bmWidth & ", Height: " & BMINFO.bmHeight & ", WidthBytes: " & BMINFO.bmWidthBytes & ", Planes: " & Asc(BMINFO.bmPlanes) & ", BitsPixel: " & Asc(BMINFO.bmBitsPixel)
- 'SetScrollyText X$
- X = GetImageInfo()
- 'XX% = fileinfo(Filename$, FileType$, fWidth%, fHeight%, fbitspixel%, fPlanes%, fColors%, fCompression$, bDebug%)
- 'Free Replaced Resources
- If (hddb <> Oldhddb) And Oldhddb Then DeleteObject (Oldhddb)
- If (hdib <> Oldhdib) And Oldhdib Then DeleteObject (Oldhdib)
- If (hpal <> Oldhpal) And Oldhpal Then DeleteObject (Oldhpal)
- X = SelectPalette(hTempDC, hpal, False)
- SetPalette
- Else
- 'Load Failed Restore Previous GDI Handles
- hddb = Oldhddb
- hdib = Oldhdib
- hpal = Oldhpal
- Exit Function
- End If
- Screen.MousePointer = 0
-
- LoadImage = True
- Filename$ = CMDialog1.Filename
- P% = InStr(Filename$, ".")
- If P% = 0 Then
- Form.Caption = Form_Caption$ + " - (NoName)"
- Exit Function
- Else
- For I% = P% To 1 Step -1
- If InStr(":\", Mid$(Filename$, I%, 1)) Then Exit For
- Next I%
- End If
- MainForm.Caption = Form_Caption$ + " - " + Mid$(Filename$, I% + 1)
- End If
- End Function
- Function Redraw()
- If hddb = 0 Then Exit Function
- X = SetStretchBltMode(Picture1.hdc, 3)
- If RDR.bNormal Then
- X = BitBlt(Picture1.hdc, RDR.X, RDR.Y, RDR.W, RDR.H, hTempDC, 0, 0, SRCCOPY)
- X = StretchBlt(Picture1.hdc, 0, 0, RDR.X, RDR.Y, hTempDC, 0, 0, RDR.W, RDR.H, SRCCOPY)
- End If
- SetPalette
- End Function
- Function SaveImage(IType$) As Integer
- EMsg$ = "File Not Saved!, Please specify a valid file type."
- Ftr$ = GetFilterString$(IType$, F%)
- CMDialog1.Filename = ""
- CMDialog1.flags = &H1000&
- CMDialog1.Filter = Ftr$
- CMDialog1.Action = 2
- If CMDialog1.Filename <> "" Then
- Screen.MousePointer = 11
-
- Filename$ = CMDialog1.Filename
-
- ' Abort Function if intended file is invalid
- P% = InStr(Filename$, ".")
- If P% And P% < Len(Filename$) Then
- EXT$ = Mid$(Filename$, P% + 1)
- Ftr$ = GetFilterString$(EXT$, F%)
- If F% = -1 Then
- Screen.MousePointer = 0
- MsgBox EMsg$
- Exit Function
- End If
- Else
- If IType$ <> "" Then
- Filename$ = Filename$ + "." + IType$
- Else
- Screen.MousePointer = 0
- MsgBox EMsg$
- Exit Function
- End If
- End If
-
- Select Case (F%)
- Case 0:
- r = writejpgfile(Filename$, JpegSaveQuality, JpegSaveSmooth, 24, hddb, hpal, 0, bDebug%)
- Case 1:
- r = writegiffile(Filename$, WriteResolution, hddb, hpal, 0, bDebug%)
- Case 2:
- r = writepcxfile(Filename$, WriteResolution, hddb, hpal, 0, bDebug%)
- Case 3:
- r = writebmpfile(Filename$, WriteResolution, hddb, hpal, 0, bDebug%)
- Case 4:
- r = writepngfile(Filename$, WriteResolution, bPNGInterlaced, hddb, hpal, 0, bDebug%)
- Case 5:
- r = writetiffile(Filename$, Compression, TiffStripSize, WriteResolution, hddb, hpal, 0, bDebug%)
- End Select
-
- Screen.MousePointer = 0
-
- If r Then
- SaveImage = True
- Else
- SaveImage = False
- Exit Function
- End If
- End If
- End Function
- Function SaveConfig() As Integer
- NA$ = App.Path + "\" + App.EXEName + ".CFG"
- ConfigData.ReadResolution = ReadResolution
- ConfigData.ReadScale = ReadScale
- ConfigData.WriteResolution = WriteResolution
- ConfigData.bPNGInterlaced = bPNGInterlaced
- ConfigData.Compression = Compression
- ConfigData.ReadDither = ReadDither
- ConfigData.JpegSaveQuality = JpegSaveQuality
- ConfigData.JpegSaveSmooth = JpegSaveSmooth
- ConfigData.DisplayOption = I_Resize_Method%
- ConfigData.bDebug = bDebug%
- On Error GoTo FileError
- SF% = FreeFile
- Open NA$ For Binary As SF% Len = Len(ConfigData)
- Put #SF%, , ConfigData
- Close SF%
- SaveConfig = 1
- Exit Function
- FileError:
- On Error GoTo 0
- SaveConfig = 0
- End Function
- Sub SetPalette()
- iOldPAL = SelectPalette(Picture1.hdc, hpal, False)
- X = RealizePalette(Picture1.hdc)
- End Sub
- Sub ShowDisplayOptions(bShow%)
- 'Frame_Opts.top = Frame3.top
- 'Frame_Opts.left = Frame3.left
- 'Frame_Opts.Visible = bShow%
- TB_Quality.Text = Str$(100 - VS_Quality.value)
- TB_Smooth.Text = Str$(100 - VS_Smooth.value)
- End Sub
- Sub UpdateControls()
- For I% = 0 To 4
- OPTION_W_Resolution(I%).value = False
- OPTION_R_Resolution(I%).value = False
- Next I%
- For I% = 0 To 3
- OptShow(I%).value = False
- OPTION_Scale(I%).value = False
- Option_TIFF_Compression(I%).value = False
- Next I%
- VS_Quality.value = 100 - JpegSaveQuality
- VS_Smooth.value = 100 - JpegSaveSmooth
- TB_Quality.Text = Str$(JpegSaveQuality)
- TB_Smooth.Text = Str$(JpegSaveSmooth)
- Check2.value = bPNGInterlaced
- Check1.value = ReadDither
- Check_ShowErrorDialogs.value = bDebug%
- Select Case (WriteResolution)
- Case 1: OPTION_W_Resolution(0).value = True
- Case 0: OPTION_W_Resolution(1).value = True
- Case 4: OPTION_W_Resolution(2).value = True
- Case 8: OPTION_W_Resolution(3).value = True
- Case 24: OPTION_W_Resolution(4).value = True
- End Select
- Select Case (ReadResolution)
- Case 1: OPTION_R_Resolution(0).value = True
- Case 0: OPTION_R_Resolution(1).value = True
- Case 4: OPTION_R_Resolution(2).value = True
- Case 8: OPTION_R_Resolution(3).value = True
- Case 24: OPTION_R_Resolution(4).value = True
- End Select
- Select Case (Compression)
- Case 1: Option_TIFF_Compression(0).value = True
- Case 2: Option_TIFF_Compression(1).value = True
- Case 5: Option_TIFF_Compression(2).value = True
- Case 32773: Option_TIFF_Compression(3).value = True
- End Select
- Select Case (ReadScale)
- Case 1: OPTION_Scale(0).value = True
- Case 2: OPTION_Scale(1).value = True
- Case 4: OPTION_Scale(2).value = True
- Case 8: OPTION_Scale(3).value = True
- End Select
- If I_Resize_Method% < 0 Or I_Resize_Method% > 3 Then
- I_Resize_Method% = 0
- End If
- OptShow(I_Resize_Method%).value = True
- End Sub
- Private Sub Check_ShowErrorDialogs_Click()
- bDebug% = Check_ShowErrorDialogs.value
- End Sub
- Private Sub Check1_Click()
- If Check1.value = 1 Then ReadDither = 1 Else ReadDither = 0
- End Sub
- Private Sub Check2_Click()
- If Check2.value = 1 Then PNGInterlaced = 1 Else PNGInterlaced = 0
- End Sub
- Private Sub CMD_OPT_OK_Click()
- End Sub
- Private Sub cmdExit_Click()
- End
- End Sub
- Private Sub Command1_Click()
- End Sub
- Private Sub COMMAND_SETUP_OK_Click()
- Frame_SETUP.Visible = False
- PICTURE_B_LOAD(0).Enabled = True
- Picture_B_Save(0).Enabled = True
- Picture_B_Setup(0).Enabled = True
- JpegSaveQuality = Val(TB_Quality.Text)
- JpegSaveSmooth = Val(TB_Smooth.Text)
- If Check_SaveSettingsOnOK.value = 1 Then
- X = SaveConfig()
- End If
- End Sub
- Private Sub Form_Activate()
- X = Redraw()
- End Sub
- Private Sub Form_Load()
- DevBPP = GetDeviceCaps(hdc, BITSPIXEL)
- ReadResolution = 8
- WriteResolution = 8
- PNGInterlaced = 0
- ReadDither = 1
- JpegSaveQuality = 75 '0 to 100 (poor to good)
- JpegSaveSmooth = 10 '0 to 100 (none to full)
- Compression = 1
- TiffStripSize = 5
- P_ctl_width% = Picture1.Width
- P_ctl_height% = Picture1.Height
- P_ctl_X% = Picture1.left
- P_ctl_Y% = Picture1.top
- bDebug% = 0
- X = twainavailable(hWnd, 0)
- EnableButton_Select (X = 1)
- EnableButton_Aquire (X = 1)
- hTempDC = CreateCompatibleDC(Picture1.hdc)
- X = LoadConfig()
- UpdateControls
- Form_Caption$ = "ImageLib 3.1 Example"
- End Sub
- Private Sub Form_Paint()
- X = Redraw()
- Timer1.Enabled = True
- End Sub
- Private Sub Form_Terminate()
- If (hddb) Then DeleteObject (hddb)
- If (hdib) Then DeleteObject (hdib)
- If (hpal) Then DeleteObject (hpal)
- X = DeleteDC(hTempDC)
- End Sub
- Private Sub Frame2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- ShowDisplayOptions True
- End Sub
- Private Sub HS_Image_Change()
- I_X% = HS_Image.value
- X = DrawDIB(False)
- Timer1.Enabled = True
- End Sub
- Private Sub LIST_SELECT_Click()
- For I% = 0 To 2
- Frame_SU_Panel(I%).Visible = (LIST_SELECT.ListIndex = I%)
- Next I%
- End Sub
- Private Sub OPTION_R_Resolution_Click(Index As Integer)
- Select Case (Index)
- Case 0: ReadResolution = 1
- Case 1: ReadResolution = 0
- Case 2: ReadResolution = 4
- Case 3: ReadResolution = 8
- Case 4: ReadResolution = 24
- End Select
- End Sub
- Private Sub OPTION_Scale_Click(Index As Integer)
- Select Case (Index)
- Case 0: ReadScale = 1
- Case 1: ReadScale = 2
- Case 2: ReadScale = 4
- Case 3: ReadScale = 8
- End Select
- End Sub
- Private Sub Option_TIFF_Compression_Click(Index As Integer)
- Select Case (Index)
- Case 0: Compression = 1
- Case 1: Compression = 2
- Case 2: Compression = 5
- Case 3: Compression = 32773
- End Select
- End Sub
- Private Sub OPTION_W_Resolution_Click(Index As Integer)
- Select Case (Index)
- Case 0: WriteResolution = 1
- Case 1: WriteResolution = 0
- Case 2: WriteResolution = 4
- Case 3: WriteResolution = 8
- Case 4: WriteResolution = 24
- End Select
- End Sub
- Private Sub OptShow_Click(Index As Integer)
- I_Resize_Method% = Index
- X = DrawDIB(True)
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Aquire_Click(Index As Integer)
- newhddb% = 0: newhpal% = 0: HideUI% = 0
- r = aquireimage(hWnd, ReadResolution, ReadDither, HideUI%, newhddb%, newhpal%, 0, bDebug%)
- If (newhddb% <> 0) And hddb Then
- DeleteObject (hddb)
- hddb = newhddb%
- End If
- If (newhpal% <> 0) And hpal Then
- DeleteObject (hpal)
- hddb = newhpal%
- X = DrawDIB(True)
- Picture1_Click
- Timer1.Enabled = True
- End If
- Filename$ = ""
-
- End Sub
- Private Sub Picture_B_Aquire_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Aquire(0).Picture = Picture_B_Aquire(2).Picture
- End Sub
- Private Sub Picture_B_Aquire_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Aquire(0).Picture = Picture_B_Aquire(1).Picture
- Timer1.Enabled = True
- End Sub
- Private Sub PICTURE_B_LOAD_Click(Index As Integer)
- bLoadedOk% = LoadImage("")
- If bLoadedOk% Then
- X = DrawDIB(True)
- Picture1_Click
- Timer1.Enabled = True
- End If
- End Sub
- Private Sub PICTURE_B_LOAD_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- PICTURE_B_LOAD(0).Picture = PICTURE_B_LOAD(2).Picture
- End Sub
- Private Sub PICTURE_B_LOAD_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- PICTURE_B_LOAD(0).Picture = PICTURE_B_LOAD(1).Picture
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Save_Click(Index As Integer)
- SaveImage ("")
- Picture1_Click
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Save_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Save(0).Picture = Picture_B_Save(2).Picture
- End Sub
- Private Sub Picture_B_Save_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Save(0).Picture = Picture_B_Save(1).Picture
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Select_Click(Index As Integer)
- X = selectsource(hWnd, bDebug%)
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Select_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Select(0).Picture = Picture_B_Select(2).Picture
- End Sub
- Private Sub Picture_B_Select_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Select(0).Picture = Picture_B_Select(1).Picture
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Setup_Click(Index As Integer)
- Frame_SETUP.Visible = True
- PICTURE_B_LOAD(0).Enabled = False
- Picture_B_Save(0).Enabled = False
- Picture_B_Setup(0).Enabled = False
- UpdateControls
- Picture1_Click
- Timer1.Enabled = True
- End Sub
- Private Sub Picture_B_Setup_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Setup(0).Picture = Picture_B_Setup(2).Picture
- End Sub
- Private Sub Picture_B_Setup_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- Picture_B_Setup(0).Picture = Picture_B_Setup(1).Picture
- Timer1.Enabled = True
- End Sub
- Private Sub Picture1_Click()
- X = Redraw()
- End Sub
- Private Sub Picture1_GotFocus()
- X = Redraw()
- End Sub
- Private Sub Picture1_LostFocus()
- SetPalette
- End Sub
- Private Sub Picture1_Paint()
- Picture1_Click
- End Sub
- Private Sub Picture2_Click()
- End Sub
- Private Sub Timer1_Timer()
- Picture1_Click
- Timer1.Enabled = False
- End Sub
- Private Sub VS_Image_Change()
- I_Y% = VS_Image.value
- X = DrawDIB(False)
- Timer1.Enabled = True
- End Sub
- Private Sub VS_Quality_Change()
- TB_Quality.Text = Str$(100 - VS_Quality.value)
- End Sub
- Private Sub VS_Smooth_Change()
- TB_Smooth.Text = Str$(100 - VS_Smooth.value)
- End Sub
-