ImagesForLazarus: fix the example so it compiles and runs

git-svn-id: trunk@42160 -
This commit is contained in:
juha 2013-07-20 17:56:54 +00:00
parent 7b2d487b16
commit d1794b7b1c
4 changed files with 85 additions and 84 deletions

View File

@ -1,15 +1,18 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="/"/>
<Version Value="5"/>
<Version Value="9"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="Images Example"/>
</General>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@ -39,9 +42,10 @@
</Unit0>
<Unit1>
<Filename Value="mainform.pas"/>
<ComponentName Value="ImagesExampleForm"/>
<IsPartOfProject Value="True"/>
<ResourceFilename Value="mainform.lrs"/>
<ComponentName Value="ImagesExampleForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MainForm"/>
</Unit1>
<Unit2>
@ -51,17 +55,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Version Value="11"/>
<SearchPaths>
<OtherUnitFiles Value="$(LazarusDir)/components/units/$(TargetCPU)/$(TargetOS)/"/>
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/>
<OtherUnitFiles Value="$(LazarusDir)/components/units/$(TargetCPU)/$(TargetOS)"/>
<SrcPath Value="$(LazarusDir)/lcl;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
<DebugInfoType Value="dsStabs"/>
</Debugging>
</Linking>
<Other>

View File

@ -1,85 +1,83 @@
object ImagesExampleForm: TImagesExampleForm
Caption = 'Example for package "Images For Lazarus"'
ClientHeight = 416
ClientWidth = 425
PixelsPerInch = 95
HorzScrollBar.Page = 426
VertScrollBar.Page = 417
Left = 516
Height = 416
Top = 160
Width = 425
HorzScrollBar.Page = 426
VertScrollBar.Page = 417
Caption = 'Example for package "Images For Lazarus"'
ClientHeight = 416
ClientWidth = 425
LCLVersion = '1.1'
object ImageGroupBox: TGroupBox
Left = 0
Height = 336
Top = 0
Width = 425
Align = alTop
Anchors = [akTop, akLeft, akBottom]
Caption = '...'
ClientHeight = 315
ClientHeight = 317
ClientWidth = 421
ParentColor = True
ParentCtl3D = False
TabOrder = 0
Height = 336
Width = 425
object Image1: TImage
Left = 0
Height = 317
Top = 0
Width = 421
Align = alClient
AutoSize = True
Center = True
Transparent = True
Height = 315
Width = 421
end
end
object LoadJPEGButton: TButton
Left = 229
Height = 25
Top = 346
Width = 173
Anchors = [akLeft, akBottom]
Caption = 'Load JPEG from file'
OnClick = LoadJPEGButtonClick
TabOrder = 1
Left = 229
Height = 25
Top = 346
Width = 173
end
object SaveJPEGButton: TButton
Left = 229
Height = 25
Top = 380
Width = 173
Anchors = [akLeft, akBottom]
Caption = 'Save as JPEG to file'
OnClick = SaveJPEGButtonClick
TabOrder = 2
Left = 229
Height = 25
Top = 380
Width = 173
end
object LoadImageButton: TButton
Anchors = [akLeft, akBottom]
Caption = 'Load Image'
OnClick = LoadImageButtonClick
TabOrder = 3
Left = 24
Height = 25
Top = 346
Width = 163
Anchors = [akLeft, akBottom]
Caption = 'Load Image'
OnClick = LoadImageButtonClick
TabOrder = 3
end
object SaveImageButton: TButton
Anchors = [akLeft, akBottom]
Caption = 'Save Image'
OnClick = SaveImageButtonClick
TabOrder = 4
Left = 24
Height = 25
Top = 380
Width = 163
Anchors = [akLeft, akBottom]
Caption = 'Save Image'
OnClick = SaveImageButtonClick
TabOrder = 4
end
object OpenPictureDialog1: TOpenPictureDialog
Filter = 'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'
Title = 'Open existing file'
Filter = 'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'
FilterIndex = 0
left = 88
top = 64
end
object SavePictureDialog1: TSavePictureDialog
Filter = 'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'
Title = 'Save file as'
Filter = 'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'
FilterIndex = 0
left = 88

View File

@ -1,34 +1,31 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TImagesExampleForm','FORMDATA',[
'TPF0'#18'TImagesExampleForm'#17'ImagesExampleForm'#7'Caption'#6'(Example for'
+' package "Images For Lazarus"'#12'ClientHeight'#3#160#1#11'ClientWidth'#3
+#169#1#13'PixelsPerInch'#2'_'#18'HorzScrollBar.Page'#3#170#1#18'VertScrollBa'
+'r.Page'#3#161#1#4'Left'#3#4#2#6'Height'#3#160#1#3'Top'#3#160#0#5'Width'#3
+#169#1#0#9'TGroupBox'#13'ImageGroupBox'#5'Align'#7#5'alTop'#7'Anchors'#11#5
+'akTop'#6'akLeft'#8'akBottom'#0#7'Caption'#6#3'...'#12'ClientHeight'#3';'#1
+#11'ClientWidth'#3#165#1#11'ParentColor'#9#11'ParentCtl3D'#8#8'TabOrder'#2#0
+#6'Height'#3'P'#1#5'Width'#3#169#1#0#6'TImage'#6'Image1'#5'Align'#7#8'alClie'
+'nt'#8'AutoSize'#9#6'Center'#9#11'Transparent'#9#6'Height'#3';'#1#5'Width'#3
+#165#1#0#0#0#7'TButton'#14'LoadJPEGButton'#7'Anchors'#11#6'akLeft'#8'akBotto'
+'m'#0#7'Caption'#6#19'Load JPEG from file'#7'OnClick'#7#19'LoadJPEGButtonCli'
+'ck'#8'TabOrder'#2#1#4'Left'#3#229#0#6'Height'#2#25#3'Top'#3'Z'#1#5'Width'#3
+#173#0#0#0#7'TButton'#14'SaveJPEGButton'#7'Anchors'#11#6'akLeft'#8'akBottom'
+#0#7'Caption'#6#20'Save as JPEG to file'#7'OnClick'#7#19'SaveJPEGButtonClick'
+#8'TabOrder'#2#2#4'Left'#3#229#0#6'Height'#2#25#3'Top'#3'|'#1#5'Width'#3#173
+#0#0#0#7'TButton'#15'LoadImageButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7
+'Caption'#6#10'Load Image'#7'OnClick'#7#20'LoadImageButtonClick'#8'TabOrder'
+#2#3#4'Left'#2#24#6'Height'#2#25#3'Top'#3'Z'#1#5'Width'#3#163#0#0#0#7'TButto'
+'n'#15'SaveImageButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#10
+'Save Image'#7'OnClick'#7#20'SaveImageButtonClick'#8'TabOrder'#2#4#4'Left'#2
+#24#6'Height'#2#25#3'Top'#3'|'#1#5'Width'#3#163#0#0#0#18'TOpenPictureDialog'
+#18'OpenPictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic (*.png;*.xpm'
+';*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.'
+'xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#5'Title'#6#18'Open existing file'#6'Filte'
+'r'#6#143'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Port'
+'able Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.b'
+'mp'#11'FilterIndex'#2#0#4'left'#2'X'#3'top'#2'@'#0#0#18'TSavePictureDialog'
+#18'SavePictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic (*.png;*.xpm'
+';*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.'
+'xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#5'Title'#6#12'Save file as'#6'Filter'#6
'TPF0'#18'TImagesExampleForm'#17'ImagesExampleForm'#4'Left'#3#4#2#6'Height'#3
+#160#1#3'Top'#3#160#0#5'Width'#3#169#1#18'HorzScrollBar.Page'#3#170#1#18'Ver'
+'tScrollBar.Page'#3#161#1#7'Caption'#6'(Example for package "Images For Laza'
+'rus"'#12'ClientHeight'#3#160#1#11'ClientWidth'#3#169#1#10'LCLVersion'#6#3'1'
+'.1'#0#9'TGroupBox'#13'ImageGroupBox'#4'Left'#2#0#6'Height'#3'P'#1#3'Top'#2#0
+#5'Width'#3#169#1#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#8'akB'
+'ottom'#0#7'Caption'#6#3'...'#12'ClientHeight'#3'='#1#11'ClientWidth'#3#165#1
+#8'TabOrder'#2#0#0#6'TImage'#6'Image1'#4'Left'#2#0#6'Height'#3'='#1#3'Top'#2
+#0#5'Width'#3#165#1#5'Align'#7#8'alClient'#8'AutoSize'#9#6'Center'#9#11'Tran'
+'sparent'#9#0#0#0#7'TButton'#14'LoadJPEGButton'#4'Left'#3#229#0#6'Height'#2
+#25#3'Top'#3'Z'#1#5'Width'#3#173#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'C'
+'aption'#6#19'Load JPEG from file'#7'OnClick'#7#19'LoadJPEGButtonClick'#8'Ta'
+'bOrder'#2#1#0#0#7'TButton'#14'SaveJPEGButton'#4'Left'#3#229#0#6'Height'#2#25
+#3'Top'#3'|'#1#5'Width'#3#173#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capt'
+'ion'#6#20'Save as JPEG to file'#7'OnClick'#7#19'SaveJPEGButtonClick'#8'TabO'
+'rder'#2#2#0#0#7'TButton'#15'LoadImageButton'#4'Left'#2#24#6'Height'#2#25#3
+'Top'#3'Z'#1#5'Width'#3#163#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Captio'
+'n'#6#10'Load Image'#7'OnClick'#7#20'LoadImageButtonClick'#8'TabOrder'#2#3#0
+#0#7'TButton'#15'SaveImageButton'#4'Left'#2#24#6'Height'#2#25#3'Top'#3'|'#1#5
+'Width'#3#163#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#10'Save I'
+'mage'#7'OnClick'#7#20'SaveImageButtonClick'#8'TabOrder'#2#4#0#0#18'TOpenPic'
+'tureDialog'#18'OpenPictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic '
+'(*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.pn'
+'g|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#11'FilterIndex'#2#0#4'left'#2
+'X'#3'top'#2'@'#0#0#18'TSavePictureDialog'#18'SavePictureDialog1'#6'Filter'#6
+#143'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable '
+'Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#11
+'FilterIndex'#2#0#4'left'#2'X'#3'top'#2'p'#0#0#0

View File

@ -59,7 +59,7 @@ implementation
uses
{Units of package "Images For Lazarus"}
LazPNM, LazJPG, LazTGA, LazPNG, LazXPM, LazBMP;
LazJPG, LazTGA; //, LazPNM, LazPNG, LazXPM, LazBMP;
{ TImagesExampleForm }
@ -189,19 +189,19 @@ end;
initialization
// LazPNG.Register;
// LazXPM.Register;
LazBMP.Register;
LazPNM.Register;
// LazBMP.Register;
// LazPNM.Register;
LazTGA.Register;
LazJPG.Register;
// LazJPG.Register;
{$I mainform.lrs}
finalization
// LazPNG.UnRegister;
// LazXPM.UnRegister;
LazBMP.UnRegister;
LazPNM.UnRegister;
// LazBMP.UnRegister;
// LazPNM.UnRegister;
LazTGA.UnRegister;
LazJPG.UnRegister;
// LazJPG.UnRegister;
end.