home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 7_2009-2012.ISO / data / zips / a_Super_Im218778992010.psc / frmMain.frm < prev    next >
Text File  |  2010-09-09  |  17KB  |  507 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "ComDlg32.OCX"
  3. Begin VB.Form frmMain 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Image Auto-Correct         -  by   Zaid Markabi           -   zaidmarkabi@yahoo.com            -   yazanmarkabi.com"
  6.    ClientHeight    =   6240
  7.    ClientLeft      =   45
  8.    ClientTop       =   345
  9.    ClientWidth     =   13080
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   6240
  15.    ScaleWidth      =   13080
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.PictureBox Picture3 
  18.       BorderStyle     =   0  'None
  19.       Height          =   1695
  20.       Left            =   120
  21.       ScaleHeight     =   1695
  22.       ScaleWidth      =   12855
  23.       TabIndex        =   7
  24.       Top             =   4440
  25.       Width           =   12855
  26.       Begin VB.CommandButton cmdTest 
  27.          BackColor       =   &H00FFC0C0&
  28.          Caption         =   "Fog"
  29.          Height          =   375
  30.          Index           =   5
  31.          Left            =   3600
  32.          Style           =   1  'Graphical
  33.          TabIndex        =   8
  34.          Top             =   1200
  35.          Width           =   1455
  36.       End
  37.       Begin VB.CommandButton cmdTest 
  38.          BackColor       =   &H00C0C0FF&
  39.          Caption         =   "Burn"
  40.          Height          =   375
  41.          Index           =   2
  42.          Left            =   2160
  43.          Style           =   1  'Graphical
  44.          TabIndex        =   9
  45.          Top             =   1200
  46.          Width           =   1455
  47.       End
  48.       Begin VB.CommandButton cmdTest 
  49.          BackColor       =   &H00E0E0E0&
  50.          Caption         =   "Night"
  51.          Height          =   375
  52.          Index           =   4
  53.          Left            =   3600
  54.          Style           =   1  'Graphical
  55.          TabIndex        =   10
  56.          Top             =   840
  57.          Width           =   1455
  58.       End
  59.       Begin VB.CommandButton cmdTest 
  60.          BackColor       =   &H00FFFFC0&
  61.          Caption         =   "Water"
  62.          Height          =   375
  63.          Index           =   1
  64.          Left            =   2160
  65.          Style           =   1  'Graphical
  66.          TabIndex        =   11
  67.          Top             =   840
  68.          Width           =   1455
  69.       End
  70.       Begin VB.CommandButton cmdTest 
  71.          BackColor       =   &H00FFFFFF&
  72.          Caption         =   "Sunlight"
  73.          Height          =   375
  74.          Index           =   3
  75.          Left            =   3600
  76.          Style           =   1  'Graphical
  77.          TabIndex        =   12
  78.          Top             =   480
  79.          Width           =   1455
  80.       End
  81.       Begin VB.CommandButton cmdApply 
  82.          Caption         =   "Apply"
  83.          Height          =   615
  84.          Left            =   11760
  85.          TabIndex        =   19
  86.          Top             =   120
  87.          Width           =   975
  88.       End
  89.       Begin VB.HScrollBar HScroll1 
  90.          Height          =   255
  91.          Left            =   7440
  92.          Max             =   10
  93.          Min             =   1
  94.          TabIndex        =   18
  95.          Top             =   480
  96.          Value           =   5
  97.          Width           =   1935
  98.       End
  99.       Begin VB.HScrollBar HScroll2 
  100.          Height          =   255
  101.          Left            =   6720
  102.          Max             =   10
  103.          Min             =   1
  104.          TabIndex        =   17
  105.          Top             =   1320
  106.          Value           =   6
  107.          Width           =   1935
  108.       End
  109.       Begin VB.HScrollBar HScroll3 
  110.          Height          =   255
  111.          Left            =   8760
  112.          Max             =   10
  113.          Min             =   1
  114.          TabIndex        =   16
  115.          Top             =   1320
  116.          Value           =   6
  117.          Width           =   1935
  118.       End
  119.       Begin VB.HScrollBar HScroll4 
  120.          Height          =   255
  121.          Left            =   10800
  122.          Max             =   10
  123.          Min             =   1
  124.          TabIndex        =   15
  125.          Top             =   1320
  126.          Value           =   6
  127.          Width           =   1935
  128.       End
  129.       Begin VB.HScrollBar HScroll5 
  130.          Height          =   255
  131.          Left            =   9480
  132.          Max             =   4
  133.          Min             =   1
  134.          TabIndex        =   14
  135.          Top             =   480
  136.          Value           =   2
  137.          Width           =   1935
  138.       End
  139.       Begin VB.CommandButton cmdTest 
  140.          BackColor       =   &H00C0FFC0&
  141.          Caption         =   "Natural"
  142.          Height          =   375
  143.          Index           =   0
  144.          Left            =   2160
  145.          Style           =   1  'Graphical
  146.          TabIndex        =   0
  147.          Top             =   480
  148.          Width           =   1455
  149.       End
  150.       Begin VB.CommandButton cmdTest 
  151.          BackColor       =   &H00C0FFFF&
  152.          Caption         =   "Auto-Correct"
  153.          BeginProperty Font 
  154.             Name            =   "MS Sans Serif"
  155.             Size            =   8.25
  156.             Charset         =   178
  157.             Weight          =   700
  158.             Underline       =   0   'False
  159.             Italic          =   0   'False
  160.             Strikethrough   =   0   'False
  161.          EndProperty
  162.          Height          =   495
  163.          Index           =   6
  164.          Left            =   240
  165.          MaskColor       =   &H00FF00FF&
  166.          Style           =   1  'Graphical
  167.          TabIndex        =   13
  168.          Top             =   720
  169.          Width           =   1695
  170.       End
  171.       Begin VB.Label Label1 
  172.          AutoSize        =   -1  'True
  173.          Caption         =   "Adjust Grade :"
  174.          BeginProperty Font 
  175.             Name            =   "Arial"
  176.             Size            =   11.25
  177.             Charset         =   178
  178.             Weight          =   700
  179.             Underline       =   0   'False
  180.             Italic          =   0   'False
  181.             Strikethrough   =   0   'False
  182.          EndProperty
  183.          Height          =   270
  184.          Left            =   7320
  185.          TabIndex        =   27
  186.          Top             =   120
  187.          Width           =   1500
  188.       End
  189.       Begin VB.Label Label2 
  190.          AutoSize        =   -1  'True
  191.          Caption         =   "Adjust Red :"
  192.          BeginProperty Font 
  193.             Name            =   "Arial"
  194.             Size            =   11.25
  195.             Charset         =   178
  196.             Weight          =   700
  197.             Underline       =   0   'False
  198.             Italic          =   0   'False
  199.             Strikethrough   =   0   'False
  200.          EndProperty
  201.          ForeColor       =   &H000000C0&
  202.          Height          =   270
  203.          Left            =   6600
  204.          TabIndex        =   26
  205.          Top             =   960
  206.          Width           =   1275
  207.       End
  208.       Begin VB.Label Label3 
  209.          AutoSize        =   -1  'True
  210.          Caption         =   "Adjust Green :"
  211.          BeginProperty Font 
  212.             Name            =   "Arial"
  213.             Size            =   11.25
  214.             Charset         =   178
  215.             Weight          =   700
  216.             Underline       =   0   'False
  217.             Italic          =   0   'False
  218.             Strikethrough   =   0   'False
  219.          EndProperty
  220.          ForeColor       =   &H00008000&
  221.          Height          =   270
  222.          Left            =   8640
  223.          TabIndex        =   25
  224.          Top             =   960
  225.          Width           =   1515
  226.       End
  227.       Begin VB.Label Label4 
  228.          AutoSize        =   -1  'True
  229.          Caption         =   "Adjust Blue :"
  230.          BeginProperty Font 
  231.             Name            =   "Arial"
  232.             Size            =   11.25
  233.             Charset         =   178
  234.             Weight          =   700
  235.             Underline       =   0   'False
  236.             Italic          =   0   'False
  237.             Strikethrough   =   0   'False
  238.          EndProperty
  239.          ForeColor       =   &H00C00000&
  240.          Height          =   270
  241.          Left            =   10680
  242.          TabIndex        =   24
  243.          Top             =   960
  244.          Width           =   1335
  245.       End
  246.       Begin VB.Label Label5 
  247.          AutoSize        =   -1  'True
  248.          Caption         =   "Loop (slower) :"
  249.          BeginProperty Font 
  250.             Name            =   "Arial"
  251.             Size            =   11.25
  252.             Charset         =   178
  253.             Weight          =   700
  254.             Underline       =   0   'False
  255.             Italic          =   0   'False
  256.             Strikethrough   =   0   'False
  257.          EndProperty
  258.          Height          =   270
  259.          Left            =   9360
  260.          TabIndex        =   23
  261.          Top             =   120
  262.          Width           =   1575
  263.       End
  264.       Begin VB.Line Line1 
  265.          BorderColor     =   &H00C0C0C0&
  266.          X1              =   5520
  267.          X2              =   5520
  268.          Y1              =   0
  269.          Y2              =   1680
  270.       End
  271.       Begin VB.Label Label6 
  272.          AutoSize        =   -1  'True
  273.          Caption         =   "Auto Effects (Standard)"
  274.          BeginProperty Font 
  275.             Name            =   "Arial"
  276.             Size            =   11.25
  277.             Charset         =   178
  278.             Weight          =   700
  279.             Underline       =   0   'False
  280.             Italic          =   0   'False
  281.             Strikethrough   =   0   'False
  282.          EndProperty
  283.          Height          =   270
  284.          Left            =   2160
  285.          TabIndex        =   22
  286.          Top             =   120
  287.          Width           =   2460
  288.       End
  289.       Begin VB.Label Label9 
  290.          AutoSize        =   -1  'True
  291.          Caption         =   "CUSTOM"
  292.          BeginProperty Font 
  293.             Name            =   "Arial"
  294.             Size            =   14.25
  295.             Charset         =   178
  296.             Weight          =   700
  297.             Underline       =   0   'False
  298.             Italic          =   0   'False
  299.             Strikethrough   =   0   'False
  300.          EndProperty
  301.          ForeColor       =   &H00400040&
  302.          Height          =   330
  303.          Left            =   5640
  304.          TabIndex        =   21
  305.          Top             =   240
  306.          Width           =   1275
  307.       End
  308.       Begin VB.Label Label10 
  309.          AutoSize        =   -1  'True
  310.          Caption         =   "AUTO"
  311.          BeginProperty Font 
  312.             Name            =   "Arial"
  313.             Size            =   14.25
  314.             Charset         =   178
  315.             Weight          =   700
  316.             Underline       =   0   'False
  317.             Italic          =   0   'False
  318.             Strikethrough   =   0   'False
  319.          EndProperty
  320.          ForeColor       =   &H00400040&
  321.          Height          =   330
  322.          Left            =   120
  323.          TabIndex        =   20
  324.          Top             =   240
  325.          Width           =   810
  326.       End
  327.    End
  328.    Begin VB.CommandButton cmdMove 
  329.       Caption         =   "<<"
  330.       Height          =   255
  331.       Left            =   6240
  332.       TabIndex        =   2
  333.       Top             =   3960
  334.       Width           =   375
  335.    End
  336.    Begin VB.PictureBox Picture2 
  337.       Appearance      =   0  'Flat
  338.       AutoRedraw      =   -1  'True
  339.       AutoSize        =   -1  'True
  340.       BackColor       =   &H00C0C0C0&
  341.       ForeColor       =   &H80000008&
  342.       Height          =   4215
  343.       Left            =   6480
  344.       ScaleHeight     =   4185
  345.       ScaleWidth      =   6465
  346.       TabIndex        =   4
  347.       Top             =   120
  348.       Width           =   6495
  349.       Begin VB.CommandButton cmdSave 
  350.          Caption         =   "Save .."
  351.          Height          =   255
  352.          Left            =   5760
  353.          TabIndex        =   6
  354.          Top             =   0
  355.          Width           =   735
  356.       End
  357.       Begin VB.Label Label8 
  358.          AutoSize        =   -1  'True
  359.          BackColor       =   &H0000FFFF&
  360.          Caption         =   " After "
  361.          BeginProperty Font 
  362.             Name            =   "Arial"
  363.             Size            =   14.25
  364.             Charset         =   178
  365.             Weight          =   700
  366.             Underline       =   0   'False
  367.             Italic          =   0   'False
  368.             Strikethrough   =   0   'False
  369.          EndProperty
  370.          ForeColor       =   &H000000C0&
  371.          Height          =   330
  372.          Left            =   0
  373.          TabIndex        =   5
  374.          Top             =   0
  375.          Width           =   810
  376.       End
  377.    End
  378.    Begin VB.PictureBox Picture1 
  379.       AutoRedraw      =   -1  'True
  380.       AutoSize        =   -1  'True
  381.       BorderStyle     =   0  'None
  382.       Height          =   4215
  383.       Left            =   120
  384.       Picture         =   "frmMain.frx":0000
  385.       ScaleHeight     =   4215
  386.       ScaleWidth      =   6300
  387.       TabIndex        =   1
  388.       Top             =   120
  389.       Width           =   6300
  390.       Begin MSComDlg.CommonDialog CommonDialog1 
  391.          Left            =   720
  392.          Top             =   360
  393.          _ExtentX        =   847
  394.          _ExtentY        =   847
  395.          _Version        =   393216
  396.          CancelError     =   -1  'True
  397.       End
  398.       Begin VB.CommandButton Command1 
  399.          Caption         =   "Open"
  400.          Height          =   255
  401.          Left            =   0
  402.          TabIndex        =   28
  403.          Top             =   360
  404.          Width           =   615
  405.       End
  406.       Begin VB.Label Label7 
  407.          AutoSize        =   -1  'True
  408.          BackColor       =   &H0000FFFF&
  409.          Caption         =   " Original "
  410.          BeginProperty Font 
  411.             Name            =   "Arial"
  412.             Size            =   14.25
  413.             Charset         =   178
  414.             Weight          =   700
  415.             Underline       =   0   'False
  416.             Italic          =   0   'False
  417.             Strikethrough   =   0   'False
  418.          EndProperty
  419.          ForeColor       =   &H000000C0&
  420.          Height          =   330
  421.          Left            =   0
  422.          TabIndex        =   3
  423.          Top             =   0
  424.          Width           =   1245
  425.       End
  426.    End
  427. End
  428. Attribute VB_Name = "frmMain"
  429. Attribute VB_GlobalNameSpace = False
  430. Attribute VB_Creatable = False
  431. Attribute VB_PredeclaredId = True
  432. Attribute VB_Exposed = False
  433.  
  434. ' Image Auto-Correction - 2010.9.10
  435. ' this tool can be used to Correct image colors, Refresh old photos, Adjust colors.
  436. '
  437. ' This code had written by
  438. '  Zaid Markabi , Arabic Syrian student.
  439. '
  440. ' Email :   zaidmarkabi@yahoo.com
  441. ' Website : yazanmarkabi.com  or  yazanmarkabi.webs.com
  442. '
  443.  
  444. Private Sub cmdApply_Click()
  445. Fast_Adjust Picture1, Picture2, HScroll1.Value, HScroll2.Value, HScroll3.Value, HScroll4.Value, HScroll5.Value
  446. End Sub
  447.  
  448. Private Sub cmdMove_Click()
  449. Picture1.Picture = Picture2.Image
  450. End Sub
  451.  
  452. Private Sub cmdSave_Click()
  453. SavePicture Picture2.Image, "c:\Output_AutoCorrect.bmp"
  454. MsgBox "Image had saved to this path :" + vbCrLf + vbCrLf + "C:\Output_AutoCorrect.bmp", vbOKOnly + vbInformation, "Save"
  455. End Sub
  456.  
  457. Private Sub cmdTest_Click(Index As Integer)
  458. Select Case Index
  459. Case Is = 0
  460.     Fast_Adjust Picture1, Picture2, 5, 9, 9, 5, 2
  461. Case Is = 1
  462.     Fast_Adjust Picture1, Picture2, 6, 3, 7, 9, 2
  463. Case Is = 2
  464.     Fast_Adjust Picture1, Picture2, 5, 9, 5, 5, 3
  465. Case Is = 3
  466.     Fast_Adjust Picture1, Picture2, 5, 9, 9, 9, 3
  467. Case Is = 4
  468.     Fast_Adjust Picture1, Picture2, 5, 1, 1, 1, 2
  469. Case Is = 5
  470.     Fast_Adjust Picture1, Picture2, 2, 16, 16, 16, 1
  471. Case Is = 6
  472.     Fast_Adjust Picture1, Picture2, 5, 6, 6, 6, 2
  473. End Select
  474. End Sub
  475.  
  476. Private Sub Command1_Click()
  477. On Error GoTo Err
  478. CommonDialog1.ShowOpen
  479. Picture1.Picture = LoadPicture(CommonDialog1.FileName)
  480. Picture2.Picture = Picture1.Picture
  481. Err:
  482. End Sub
  483.  
  484. Private Sub Form_Load()
  485. cmdTest_Click 0
  486. End Sub
  487.  
  488. Private Sub HScroll1_Change()
  489. cmdApply_Click
  490. End Sub
  491.  
  492. Private Sub HScroll2_Change()
  493. cmdApply_Click
  494. End Sub
  495.  
  496. Private Sub HScroll3_Change()
  497. cmdApply_Click
  498. End Sub
  499.  
  500. Private Sub HScroll4_Change()
  501. cmdApply_Click
  502. End Sub
  503.  
  504. Private Sub HScroll5_Change()
  505. cmdApply_Click
  506. End Sub
  507.