| 28 |
|
procedure DrawImage(index: Integer); |
| 29 |
|
procedure SetBitmapCount(Count: Integer); |
| 30 |
|
procedure LoadImage(fileid, index: Integer); |
| 31 |
+ |
procedure Splitter1Moved(Sender: TObject); |
| 32 |
|
private |
| 33 |
|
bitmaps: array of TOniImage; |
| 34 |
|
actualimg: Byte; |
| 41 |
|
|
| 42 |
|
implementation |
| 43 |
|
{$R *.dfm} |
| 44 |
< |
uses Imaging, ImagingComponents, ImagingTypes; |
| 44 |
> |
uses Imaging, ImagingComponents, ImagingTypes, jpeg; |
| 45 |
|
|
| 46 |
|
|
| 47 |
|
procedure TForm_Preview.FormCreate(Sender: TObject); |
| 48 |
|
begin |
| 49 |
|
inherited; |
| 50 |
|
Self.OnNewFileSelected := NewFile; |
| 51 |
+ |
SetBitmapCount(0); |
| 52 |
|
end; |
| 53 |
|
|
| 54 |
|
|
| 57 |
|
ext: String; |
| 58 |
|
begin |
| 59 |
|
_fileid := fileinfo.ID; |
| 60 |
+ |
SetBitmapCount(0); |
| 61 |
|
if _fileid >= 0 then |
| 62 |
|
begin |
| 63 |
|
lbl_notpossible.Visible := False; |
| 117 |
|
end; |
| 118 |
|
|
| 119 |
|
|
| 120 |
+ |
procedure TForm_Preview.Splitter1Moved(Sender: TObject); |
| 121 |
+ |
begin |
| 122 |
+ |
inherited; |
| 123 |
+ |
img.Picture.Assign(nil); |
| 124 |
+ |
if Length(bitmaps) > 0 then |
| 125 |
+ |
DrawImage(0); |
| 126 |
+ |
end; |
| 127 |
+ |
|
| 128 |
|
procedure TForm_Preview.PreviewImage; |
| 129 |
|
begin |
| 130 |
|
SetBitmapCount(1); |
| 170 |
|
Self.timer.Enabled := not Self.timer.Enabled; |
| 171 |
|
Self.btn_dec.Enabled := not Self.timer.Enabled; |
| 172 |
|
Self.btn_inc.Enabled := not Self.timer.Enabled; |
| 173 |
+ |
if self.timer.Enabled then |
| 174 |
+ |
timerTimer(Self); |
| 175 |
|
if Self.timer.Enabled then |
| 176 |
|
Self.btn_startstop.Caption := 'Stop automatic' |
| 177 |
|
else |
| 212 |
|
|
| 213 |
|
begin |
| 214 |
|
AddToolListEntry('preview', 'Preview-Window', ''); |
| 215 |
< |
end. |
| 215 |
> |
end. |