home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
-
- #include <vcl.h>
- #pragma hdrstop
-
- #include "UnitGamma.h"
- #include "Fotoretusz.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TFormGamma *FormGamma;
- //---------------------------------------------------------------------------
- __fastcall TFormGamma::TFormGamma(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
-
- void __fastcall TFormGamma::tbGammaChange(TObject *Sender)
- {
- edGamma->Text = FloatToStr( 1+tbGamma->Position/100.0 );
-
- TMemoryStream *pms = new TMemoryStream;
- pms->Position = 0;
- rys1->Picture->Bitmap->SaveToStream( pms );
- pms->Position = 0;
- rys2->Picture->Bitmap->LoadFromStream( pms );
- delete pms;
- DostosujGamma( rys2->Picture->Bitmap,1+tbGamma->Position/100.0 );
- }
- //---------------------------------------------------------------------------
-
- void __fastcall TFormGamma::edGammaChange(TObject *Sender)
- {
- double v;
- if( TryStrToFloat(edGamma->Text,v) )
- tbGamma->Position = (int) (v-1)*100;
- }
- //---------------------------------------------------------------------------
-