diff --git a/internal/1.0 RC3/1/Delphi/PNGProjectGroupD10.bdsgroup b/internal/1.0 RC3/1/Delphi/PNGProjectGroupD10.bdsgroup
new file mode 100644
index 0000000..41415da
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNGProjectGroupD10.bdsgroup
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ PNG_D10.bdsproj
+ PngComponentsD10.bdsproj
+ PngComponentsD10D.bdsproj
+ PNG_D10.bpl PngComponentsD10.bpl PngComponentsD10D.bpl
+
+
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D10.bdsproj b/internal/1.0 RC3/1/Delphi/PNG_D10.bdsproj
new file mode 100644
index 0000000..21302f6
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D10.bdsproj
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+ PNG_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ PNG image runtime/designtime
+
+
+
+ ..\Lib\D10
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 3082
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+ ExpressBars by Developer Express Inc.
+ ExpressCommonLibrary by Developer Express Inc.
+ ExpressBars DBNavigator by Developer Express Inc.
+ ExpressBars extended DB items by Developer Express Inc.
+ ExpressBars extended items by Developer Express Inc.
+ ExpressDocking Library by Developer Express Inc.
+ ExpressLayout Control by Developer Express Inc.
+ ExpressNavBar by Developer Express Inc.
+ ExpressGDI+ Library by Developer Express Inc.
+ ExpressPrinting System by Developer Express Inc.
+ ExpressSideBar by Developer Express Inc.
+
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D10.dpk b/internal/1.0 RC3/1/Delphi/PNG_D10.dpk
new file mode 100644
index 0000000..7f88255
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D10.dpk
@@ -0,0 +1,37 @@
+package PNG_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PNG image runtime/designtime'}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl,
+ rtl;
+
+contains
+ pngimage in '..\Source\pngimage.pas',
+ pnglang in '..\Source\pnglang.pas',
+ pngzlib in '..\Source\pngzlib.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D10.res b/internal/1.0 RC3/1/Delphi/PNG_D10.res
new file mode 100644
index 0000000..86c94e6
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PNG_D10.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D5.cfg b/internal/1.0 RC3/1/Delphi/PNG_D5.cfg
new file mode 100644
index 0000000..8b46524
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D5.cfg
@@ -0,0 +1,38 @@
+-$A+
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J+
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Lib\D5"
+-LE"..\Lib\D5"
+-LN"..\Lib\D5"
+-Z
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D5.dof b/internal/1.0 RC3/1/Delphi/PNG_D5.dof
new file mode 100644
index 0000000..7a4d756
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D5.dof
@@ -0,0 +1,416 @@
+[Compiler]
+A=1
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=1
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=PNG image runtime/designtime
+[Directories]
+OutputDir=
+UnitOutputDir=..\Lib\D5
+PackageDLLOutputDir=..\Lib\D5
+PackageDCPOutputDir=..\Lib\D5
+SearchPath=
+Packages=Vcl50;Vclx50;vclsmp50;Qrpt50;Vcldb50;Vclbde50;ibevnt50;vcldbx50;TeeUI50;TeeDB50;Tee50;TeeQR50;VCLIB50;vclie50;Inetdb50;Inet50;NMFast50;dclocx50;dclaxserver50;RxCtl5;RxBDE5;RxDB5;fr5;FRIBX5
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+[Language]
+ActiveLang=
+ProjectLang=$00000C0A
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3082
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[Excluded Packages]
+$(DELPHI)\Projects\Bpl\dxThemeD5.bpl=Express XP Theme Manager by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxDockingD5.bpl=ExpressDocking Library by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxPSCoreD5.bpl=ExpressPrinting System by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxsbd5.bpl=ExpressSideBar by Developer Express Inc.
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlUnitOutputDirectory]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlBPLOutput]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlDCPOutput]
+Count=1
+Item0=..\Lib\D5
+[Exception Log]
+EurekaLog Version=519
+Activate=1
+Activate Handle=1
+Save Log File=1
+Foreground Tab=0
+Freeze Activate=0
+Freeze Timeout=0
+Freeze Message=The application seems to be frozen.
+SMTP From=eurekalog@email.com
+SMTP Host=
+SMTP Port=25
+SMTP UserID=
+SMTP Password=
+Append to Log=0
+Show TerminateBtn=1
+TerminateBtn Operation=1
+Errors Number=32
+Errors Terminate=3
+Email Address=
+Email Object=
+Email Send Options=0
+Output Path=
+Encrypt Password=
+AutoCloseDialogSecs=0
+WebSendMode=0
+SupportULR=
+HTMLLayout Count=15
+HTMLLine0="%3Chtml%3E"
+HTMLLine1=" %3Chead%3E"
+HTMLLine2=" %3C/head%3E"
+HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E"
+HTMLLine4=" %3Ctable width="100%%" border="0"%3E"
+HTMLLine5=" %3Ctr%3E"
+HTMLLine6=" %3Ctd nowrap%3E"
+HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E"
+HTMLLine8=" %3C%%HTML_TAG%%%3E"
+HTMLLine9=" %3C/font%3E"
+HTMLLine10=" %3C/td%3E"
+HTMLLine11=" %3C/tr%3E"
+HTMLLine12=" %3C/table%3E"
+HTMLLine13=" %3C/body%3E"
+HTMLLine14="%3C/html%3E"
+AutoCrashOperation=1
+AutoCrashNumber=10
+AutoCrashMinutes=1
+WebURL=
+WebUserID=
+WebPassword=
+WebPort=0
+AttachedFiles=
+Count=0
+EMail Message Line Count=0
+loNoDuplicateErrors=0
+loAppendReproduceText=0
+loDeleteLogAtVersionChange=0
+loAddComputerNameInLogFileName=0
+loSaveModulesSection=1
+loSaveCPUSection=1
+soAppStartDate=1
+soAppName=1
+soAppVersionNumber=1
+soAppParameters=1
+soAppCompilationDate=1
+soExcDate=1
+soExcAddress=1
+soExcModule=1
+soExcType=1
+soExcMessage=1
+soActCtlsFormClass=1
+soActCtlsFormText=1
+soActCtlsControlClass=1
+soActCtlsControlText=1
+soCmpName=1
+soCmpUser=1
+soCmpTotalMemory=1
+soCmpFreeMemory=1
+soCmpTotalDisk=1
+soCmpFreeDisk=1
+soCmpSysUpTime=1
+soCmpProcessor=1
+soCmpDisplayMode=1
+soOSType=1
+soOSBuildN=1
+soOSUpdate=1
+soOSLanguage=1
+soNetIP=1
+soNetSubmask=1
+soNetGateway=1
+soNetDNS1=1
+soNetDNS2=1
+soNetDHCP=1
+sndShowSendDialog=1
+sndShowSuccessFailureMsg=0
+sndSendEntireLog=0
+sndSendXMLLogCopy=0
+sndSendScreenshot=0
+sndUseOnlyActiveWindow=0
+sndSendLastHTMLPage=1
+sndSendInSeparatedThread=0
+sndAddDateInFileName=0
+sndCompressAllFiles=0
+edoShowExceptionDialog=1
+edoSendEmailChecked=1
+edoAttachScreenshotChecked=1
+edoShowCopyToClipOption=1
+edoShowDetailsButton=1
+edoShowInDetailedMode=0
+edoShowInTopMostMode=0
+edoUseEurekaLogLookAndFeel=1
+csoShowDLLs=1
+csoShowBPLs=1
+csoShowBorlandThreads=1
+csoShowWindowsThreads=1
+csoShowProcedureOffset=0
+boActivateCrashDetection=0
+boPauseBorlandThreads=0
+boDoNotPauseMainThread=0
+boPauseWindowsThreads=0
+boUseMainModuleOptions=1
+boCopyLogInCaseOfError=1
+boSaveCompressedCopyInCaseOfError=0
+Count mtInformationMsgCaption=1
+mtInformationMsgCaption0="Information."
+Count mtQuestionMsgCaption=1
+mtQuestionMsgCaption0="Question."
+Count mtDialog_Caption=1
+mtDialog_Caption0="Error."
+Count mtDialog_ErrorMsgCaption=2
+mtDialog_ErrorMsgCaption0="An error has occurred during program execution."
+mtDialog_ErrorMsgCaption1="Please read the following information for further details."
+Count mtDialog_GeneralCaption=1
+mtDialog_GeneralCaption0="General"
+Count mtDialog_GeneralHeader=1
+mtDialog_GeneralHeader0="General Information"
+Count mtDialog_CallStackCaption=1
+mtDialog_CallStackCaption0="Call Stack"
+Count mtDialog_CallStackHeader=1
+mtDialog_CallStackHeader0="Call Stack Information"
+Count mtDialog_ModulesCaption=1
+mtDialog_ModulesCaption0="Modules"
+Count mtDialog_ModulesHeader=1
+mtDialog_ModulesHeader0="Modules Information"
+Count mtDialog_CPUCaption=1
+mtDialog_CPUCaption0="CPU"
+Count mtDialog_CPUHeader=1
+mtDialog_CPUHeader0="CPU Information"
+Count mtDialog_CustomDataCaption=1
+mtDialog_CustomDataCaption0="Other"
+Count mtDialog_CustomDataHeader=1
+mtDialog_CustomDataHeader0="Other Information"
+Count mtDialog_OKButtonCaption=1
+mtDialog_OKButtonCaption0="%26OK"
+Count mtDialog_TerminateButtonCaption=1
+mtDialog_TerminateButtonCaption0="%26Terminate"
+Count mtDialog_RestartButtonCaption=1
+mtDialog_RestartButtonCaption0="%26Restart"
+Count mtDialog_DetailsButtonCaption=1
+mtDialog_DetailsButtonCaption0="%26Details"
+Count mtDialog_SendMessage=1
+mtDialog_SendMessage0="%26Send this error via Internet"
+Count mtDialog_ScreenshotMessage=1
+mtDialog_ScreenshotMessage0="%26Attach a Screenshot image"
+Count mtDialog_CopyMessage=1
+mtDialog_CopyMessage0="%26Copy to Clipboard"
+Count mtDialog_SupportMessage=1
+mtDialog_SupportMessage0="Go to the Support Page"
+Count mtLog_AppHeader=1
+mtLog_AppHeader0="Application"
+Count mtLog_AppStartDate=1
+mtLog_AppStartDate0="Start Date"
+Count mtLog_AppName=1
+mtLog_AppName0="Name/Description"
+Count mtLog_AppVersionNumber=1
+mtLog_AppVersionNumber0="Version Number"
+Count mtLog_AppParameters=1
+mtLog_AppParameters0="Parameters"
+Count mtLog_AppCompilationDate=1
+mtLog_AppCompilationDate0="Compilation Date"
+Count mtLog_ExcHeader=1
+mtLog_ExcHeader0="Exception"
+Count mtLog_ExcDate=1
+mtLog_ExcDate0="Date"
+Count mtLog_ExcAddress=1
+mtLog_ExcAddress0="Address"
+Count mtLog_ExcModule=1
+mtLog_ExcModule0="Module"
+Count mtLog_ExcType=1
+mtLog_ExcType0="Type"
+Count mtLog_ExcMessage=1
+mtLog_ExcMessage0="Message"
+Count mtLog_ActCtrlsHeader=1
+mtLog_ActCtrlsHeader0="Active Controls"
+Count mtLog_ActCtrlsFormClass=1
+mtLog_ActCtrlsFormClass0="Form Class"
+Count mtLog_ActCtrlsFormText=1
+mtLog_ActCtrlsFormText0="Form Text"
+Count mtLog_ActCtrlsControlClass=1
+mtLog_ActCtrlsControlClass0="Control Class"
+Count mtLog_ActCtrlsControlText=1
+mtLog_ActCtrlsControlText0="Control Text"
+Count mtLog_CmpHeader=1
+mtLog_CmpHeader0="Computer"
+Count mtLog_CmpName=1
+mtLog_CmpName0="Name"
+Count mtLog_CmpUser=1
+mtLog_CmpUser0="User"
+Count mtLog_CmpTotalMemory=1
+mtLog_CmpTotalMemory0="Total Memory"
+Count mtLog_CmpFreeMemory=1
+mtLog_CmpFreeMemory0="Free Memory"
+Count mtLog_CmpTotalDisk=1
+mtLog_CmpTotalDisk0="Total Disk"
+Count mtLog_CmpFreeDisk=1
+mtLog_CmpFreeDisk0="Free Disk"
+Count mtLog_CmpSystemUpTime=1
+mtLog_CmpSystemUpTime0="System Up Time"
+Count mtLog_CmpProcessor=1
+mtLog_CmpProcessor0="Processor"
+Count mtLog_CmpDisplayMode=1
+mtLog_CmpDisplayMode0="Display Mode"
+Count mtLog_OSHeader=1
+mtLog_OSHeader0="Operating System"
+Count mtLog_OSType=1
+mtLog_OSType0="Type"
+Count mtLog_OSBuildN=1
+mtLog_OSBuildN0="Build #"
+Count mtLog_OSUpdate=1
+mtLog_OSUpdate0="Update"
+Count mtLog_OSLanguage=1
+mtLog_OSLanguage0="Language"
+Count mtLog_NetHeader=1
+mtLog_NetHeader0="Network"
+Count mtLog_NetIP=1
+mtLog_NetIP0="IP Address"
+Count mtLog_NetSubmask=1
+mtLog_NetSubmask0="Submask"
+Count mtLog_NetGateway=1
+mtLog_NetGateway0="Gateway"
+Count mtLog_NetDNS1=1
+mtLog_NetDNS10="DNS 1"
+Count mtLog_NetDNS2=1
+mtLog_NetDNS20="DNS 2"
+Count mtLog_NetDHCP=1
+mtLog_NetDHCP0="DHCP"
+Count mtLog_CustInfoHeader=1
+mtLog_CustInfoHeader0="Custom Information"
+Count mtCallStack_Address=1
+mtCallStack_Address0="Address"
+Count mtCallStack_Name=1
+mtCallStack_Name0="Module"
+Count mtCallStack_Unit=1
+mtCallStack_Unit0="Unit"
+Count mtCallStack_Class=1
+mtCallStack_Class0="Class"
+Count mtCallStack_Procedure=1
+mtCallStack_Procedure0="Procedure/Method"
+Count mtCallStack_Line=1
+mtCallStack_Line0="Line"
+Count mtCallStack_MainThread=1
+mtCallStack_MainThread0="Main"
+Count mtCallStack_ExceptionThread=1
+mtCallStack_ExceptionThread0="Exception Thread"
+Count mtCallStack_RunningThread=1
+mtCallStack_RunningThread0="Running Thread"
+Count mtCallStack_CallingThread=1
+mtCallStack_CallingThread0="Calling Thread"
+Count mtCallStack_ThreadID=1
+mtCallStack_ThreadID0="ID"
+Count mtCallStack_ThreadPriority=1
+mtCallStack_ThreadPriority0="Priority"
+Count mtCallStack_ThreadClass=1
+mtCallStack_ThreadClass0="Class"
+Count mtSendDialog_Caption=1
+mtSendDialog_Caption0="Send."
+Count mtSendDialog_Message=1
+mtSendDialog_Message0="Message"
+Count mtSendDialog_Resolving=1
+mtSendDialog_Resolving0="Resolving DNS..."
+Count mtSendDialog_Connecting=1
+mtSendDialog_Connecting0="Connecting with server..."
+Count mtSendDialog_Connected=1
+mtSendDialog_Connected0="Connected with server."
+Count mtSendDialog_Sending=1
+mtSendDialog_Sending0="Sending message..."
+Count mtReproduceDialog_Caption=1
+mtReproduceDialog_Caption0="Request"
+Count mtReproduceDialog_Request=1
+mtReproduceDialog_Request0="Please describe the steps to reproduce the error:"
+Count mtReproduceDialog_OKButtonCaption=1
+mtReproduceDialog_OKButtonCaption0="%26OK"
+Count mtModules_Handle=1
+mtModules_Handle0="Handle"
+Count mtModules_Name=1
+mtModules_Name0="Name"
+Count mtModules_Description=1
+mtModules_Description0="Description"
+Count mtModules_Version=1
+mtModules_Version0="Version"
+Count mtModules_Size=1
+mtModules_Size0="Size"
+Count mtModules_LastModified=1
+mtModules_LastModified0="Modified"
+Count mtModules_Path=1
+mtModules_Path0="Path"
+Count mtCPU_Registers=1
+mtCPU_Registers0="Registers"
+Count mtCPU_Stack=1
+mtCPU_Stack0="Stack"
+Count mtCPU_MemoryDump=1
+mtCPU_MemoryDump0="Memory Dump"
+Count mtSend_SuccessMsg=1
+mtSend_SuccessMsg0="The message was sent successfully."
+Count mtSend_FailureMsg=1
+mtSend_FailureMsg0="Sorry, sending the message didn't work."
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D5.dpk b/internal/1.0 RC3/1/Delphi/PNG_D5.dpk
new file mode 100644
index 0000000..3a8f5f9
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D5.dpk
@@ -0,0 +1,36 @@
+package PNG_D5;
+
+{$R *.RES}
+{$ALIGN ON}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST ON}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PNG image runtime/designtime'}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl50;
+
+contains
+ pngimage in '..\Source\pngimage.pas',
+ pnglang in '..\Source\pnglang.pas',
+ pngzlib in '..\Source\pngzlib.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D5.drc b/internal/1.0 RC3/1/Delphi/PNG_D5.drc
new file mode 100644
index 0000000..f767906
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D5.drc
@@ -0,0 +1,61 @@
+/* VER130
+ Generated by the Borland Delphi Pascal Compiler
+ because -GD or --drc was supplied to the compiler.
+
+ It contains compiler-generated resource bound to the executable.
+ If it is empty, no compiler-generated resources were bound to the
+ produced executable.
+*/
+
+#define pnglang_EPNGNoImageDataText 65504
+#define pnglang_EPNGCannotChangeSizeText 65505
+#define pnglang_EPNGCannotAddChunkText 65506
+#define pnglang_EPNGCannotAddInvalidImageText 65507
+#define pnglang_EPNGCouldNotLoadResourceText 65508
+#define pnglang_EPNGOutMemoryText 65509
+#define pnglang_EPNGCannotChangeTransparentText 65510
+#define pnglang_EPNGHeaderNotPresentText 65511
+#define pnglang_EPngInvalidCRCText 65520
+#define pnglang_EPNGInvalidIHDRText 65521
+#define pnglang_EPNGMissingMultipleIDATText 65522
+#define pnglang_EPNGZLIBErrorText 65523
+#define pnglang_EPNGInvalidPaletteText 65524
+#define pnglang_EPNGInvalidFileHeaderText 65525
+#define pnglang_EPNGIHDRNotFirstText 65526
+#define pnglang_EPNGNotExistsText 65527
+#define pnglang_EPNGSizeExceedsText 65528
+#define pnglang_EPNGUnknownPalEntryText 65529
+#define pnglang_EPNGMissingPaletteText 65530
+#define pnglang_EPNGUnknownCriticalChunkText 65531
+#define pnglang_EPNGUnknownCompressionText 65532
+#define pnglang_EPNGUnknownInterlaceText 65533
+#define pnglang_EPNGCannotAssignChunkText 65534
+#define pnglang_EPNGUnexpectedEndText 65535
+STRINGTABLE
+BEGIN
+ pnglang_EPNGNoImageDataText, "This \"Portable Network Graphics\" image contains no data."
+ pnglang_EPNGCannotChangeSizeText, "The \"Portable Network Graphics\" image can not be resize by changing width and height properties. Try assigning the image from a bitmap."
+ pnglang_EPNGCannotAddChunkText, "The program tried to add a existent critical chunk to the current image which is not allowed."
+ pnglang_EPNGCannotAddInvalidImageText, "It's not allowed to add a new chunk because the current image is invalid."
+ pnglang_EPNGCouldNotLoadResourceText, "The png image could not be loaded from the resource ID."
+ pnglang_EPNGOutMemoryText, "Some operation could not be performed because the system is out of resources. Close some windows and try again."
+ pnglang_EPNGCannotChangeTransparentText, "Setting bit transparency color is not allowed for png images containing alpha value for each pixel (COLOR_RGBALPHA and COLOR_GRAYSCALEALPHA)"
+ pnglang_EPNGHeaderNotPresentText, "This operation is not valid because the current image contains no valid header."
+ pnglang_EPngInvalidCRCText, "This \"Portable Network Graphics\" image is not valid because it contains invalid pieces of data (crc error)"
+ pnglang_EPNGInvalidIHDRText, "The \"Portable Network Graphics\" image could not be loaded because one of its main piece of data (ihdr) might be corrupted"
+ pnglang_EPNGMissingMultipleIDATText, "This \"Portable Network Graphics\" image is invalid because it has missing image parts."
+ pnglang_EPNGZLIBErrorText, "Could not decompress the image because it contains invalid compressed data.\r\n Description: "
+ pnglang_EPNGInvalidPaletteText, "The \"Portable Network Graphics\" image contains an invalid palette."
+ pnglang_EPNGInvalidFileHeaderText, "The file being readed is not a valid \"Portable Network Graphics\" image because it contains an invalid header. This file may be corruped, try obtaining it again."
+ pnglang_EPNGIHDRNotFirstText, "This \"Portable Network Graphics\" image is not supported or it might be invalid.\r\n(IHDR chunk is not the first)"
+ pnglang_EPNGNotExistsText, "The png file could not be loaded because it does not exists."
+ pnglang_EPNGSizeExceedsText, "This \"Portable Network Graphics\" image is not supported because either it's width or height exceeds the maximum size, which is 65535 pixels length."
+ pnglang_EPNGUnknownPalEntryText, "There is no such palette entry."
+ pnglang_EPNGMissingPaletteText, "This \"Portable Network Graphics\" could not be loaded because it uses a color table which is missing."
+ pnglang_EPNGUnknownCriticalChunkText, "This \"Portable Network Graphics\" image contains an unknown critical part which could not be decoded."
+ pnglang_EPNGUnknownCompressionText, "This \"Portable Network Graphics\" image is encoded with an unknown compression scheme which could not be decoded."
+ pnglang_EPNGUnknownInterlaceText, "This \"Portable Network Graphics\" image uses an unknown interlace scheme which could not be decoded."
+ pnglang_EPNGCannotAssignChunkText, "The chunks must be compatible to be assigned."
+ pnglang_EPNGUnexpectedEndText, "This \"Portable Network Graphics\" image is invalid because the decoder found an unexpected end of the file."
+END
+
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D5.res b/internal/1.0 RC3/1/Delphi/PNG_D5.res
new file mode 100644
index 0000000..244ee50
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PNG_D5.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D6.dpk b/internal/1.0 RC3/1/Delphi/PNG_D6.dpk
new file mode 100644
index 0000000..ae0d12b
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D6.dpk
@@ -0,0 +1,36 @@
+package PNG_D6;
+
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$IMPLICITBUILD OFF}
+{$DESCRIPTION 'PNG image runtime/designtime'}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ pngimage in '..\Source\pngimage.pas',
+ pnglang in '..\Source\pnglang.pas',
+ pngzlib in '..\Source\pngzlib.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D7.cfg b/internal/1.0 RC3/1/Delphi/PNG_D7.cfg
new file mode 100644
index 0000000..f556c82
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\archivos de programa\borland\delphi7\Projects\Bpl"
+-LN"c:\archivos de programa\borland\delphi7\Projects\Bpl"
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D7.dof b/internal/1.0 RC3/1/Delphi/PNG_D7.dof
new file mode 100644
index 0000000..2c0237b
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D7.dof
@@ -0,0 +1,467 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=PNG image runtime/designtime
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;PluginSDK_D7R;DJcl;JvStdCtrlsD7R;JvAppFrmD7R;JvCoreD7R;JvBandsD7R;JvBDED7R;JvDBD7R;JvDlgsD7R;JvCmpD7R;JvCryptD7R;JvCtrlsD7R;JvCustomD7R;JvDockingD7R;JvDotNetCtrlsD7R;JvEDID7R;qrpt;JvGlobusD7R;JvHMID7R;JvInspectorD7R;JvInterpreterD7R;JvJansD7R;JvManagedThreadsD7R;JvMMD7R;JvNetD7R;JvPageCompsD7R;JvPluginD7R;JvPrintPreviewD7R;JvSystemD7R;JvTimeFrameworkD7R;JvUIBD7R;JvValidatorsD7R;JvWizardD7R;JvXPCtrlsD7R;GUISDK_D7;RemObjects_WebBroker_D7;RemObjects_Indy_D7;RemObjects_RODX_D7;RemObjects_BPDX_D7;PascalScript_RO_D7;DataAbstract_Core_D7;DataAbstract_IDE_D7;DataAbstract_DBXDriver_D7;DataAbstract_Scripting_D7;dxBarD7;dxComnD7;cxLibraryVCLD7;cxEditorsVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxGridVCLD7;cxPageControlVCLD7;cxSchedulerVCLD7;cxTreeListVCLD7;dxBarDBNavD7;dxBarExtDBItemsD7;dxBarExtItemsD7;dxDockingD7;dxNavBarD7;dxPSCoreD7;dxsbD7;dxPSLnksD7;dxPSTeeChartD7;EPCOTAUtils70;PNG_D7;PngComponentsD7;tb2k_d7;tbx_d7;UserControlD7_RT;fqb70;frx7;frxADO7;frxBDE7;frxcs7;frxDB7;frxDBX7;frxe7;frxIBX7;fs7;fsADO7;fsBDE7;fsDB7;fsIBX7;cxExportVCLD7;cxIntl5D7;cxIntlPrintSys3D7;dxPScxCommonD7;dxPScxExtCommonD7;dxPScxGridLnkD7;dxPScxPCProdD7;dxPScxTLLnkD7;dxPSDBTeeChartD7;dxPsPrVwAdvD7;TMSD7;FR7;FRIBX7;cxIntlSchedulerD7;dxLayoutControlD7;dxPScxScheduler2LnkD7;ComparerD7;dxPSdxLCLnkD7;dxLayoutControlcxEditAdaptersD7;cxVerticalGridVCLD7;vclShX_Generic_V3D7;vclShX_Namespace_V3D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=C:\Archivos de programa\Borland\Delphi7\Bin\
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3082
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[Excluded Packages]
+c:\archivos de programa\borland\delphi7\Bin\designdgm70.bpl=Borland Module Diagram Editview
+C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\dxPSCoreD7.bpl=ExpressPrinting System by Developer Express Inc.
+D:\Proyectos\Componentes\cxGridTools\Lib\D7\xcxGridConfigPkg7.bpl=xcxGridTools - Config Dialog
+D:\Proyectos\Componentes\cxGridTools\Lib\D7\xcxGridSummaryConfig7.bpl=xcxGridTools - Summary Config
+D:\Proyectos\Componentes\cxGridTools\Lib\D7\xcxGridEnhancedPropertiesStorePkg7.bpl=xcxGridTools - Enhanced Grid Properties Store
+D:\Proyectos\Componentes\cxGridTools\Lib\D7\xcxGridQuickSearch7.bpl=xcxGridTools - Quick Search
+D:\Proyectos\Componentes\cxGridTools\Lib\D7\xcxGridActionsPkg7.bpl=xcxGridTools - Actions
+c:\archivos de programa\borland\delphi7\Projects\Bpl\NextBaseD7.bpl=(untitled)
+c:\archivos de programa\borland\delphi7\Projects\Bpl\NextCollectionD7.bpl=(untitled)
+c:\archivos de programa\borland\delphi7\Projects\Bpl\NextAddOnsD7.bpl=(untitled)
+c:\archivos de programa\borland\delphi7\Projects\Bpl\NextTBXD7.bpl=(untitled)
+c:\archivos de programa\borland\delphi7\Projects\Bpl\NextGridD7.bpl=(untitled)
+c:\archivos de programa\borland\delphi7\Projects\Bpl\RodaxFrameD7.bpl=Frames Acana (D7)
+[Exception Log]
+EurekaLog Version=501
+Activate=1
+Activate Handle=1
+Save Log File=1
+Foreground Tab=0
+Freeze Activate=0
+Freeze Timeout=60
+Freeze Message=The application seems to be frozen.
+SMTP From=eurekalog@email.com
+SMTP Host=
+SMTP Port=25
+SMTP UserID=
+SMTP Password=
+Append to Log=0
+Show TerminateBtn=1
+TerminateBtn Operation=1
+Errors Number=32
+Errors Terminate=3
+Email Address=
+Email Object=
+Email Send Options=0
+Output Path=
+Encrypt Password=
+AutoCloseDialogSecs=0
+WebSendMode=0
+SupportULR=
+HTMLLayout Count=15
+HTMLLine0="%3Chtml%3E"
+HTMLLine1=" %3Chead%3E"
+HTMLLine2=" %3C/head%3E"
+HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E"
+HTMLLine4=" %3Ctable width="100%%" border="0"%3E"
+HTMLLine5=" %3Ctr%3E"
+HTMLLine6=" %3Ctd nowrap%3E"
+HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E"
+HTMLLine8=" %3C%%HTML_TAG%%%3E"
+HTMLLine9=" %3C/font%3E"
+HTMLLine10=" %3C/td%3E"
+HTMLLine11=" %3C/tr%3E"
+HTMLLine12=" %3C/table%3E"
+HTMLLine13=" %3C/body%3E"
+HTMLLine14="%3C/html%3E"
+AutoCrashOperation=1
+AutoCrashNumber=10
+AutoCrashMinutes=1
+WebURL=
+WebUserID=
+WebPassword=
+WebPort=0
+AttachedFiles=
+Count=0
+EMail Message Line Count=0
+loNoDuplicateErrors=0
+loAppendReproduceText=0
+loDeleteLogAtVersionChange=0
+loAddComputerNameInLogFileName=0
+loSaveModulesSection=1
+loSaveCPUSection=1
+soAppStartDate=1
+soAppName=1
+soAppVersionNumber=1
+soAppParameters=1
+soAppCompilationDate=1
+soExcDate=1
+soExcAddress=1
+soExcModule=1
+soExcType=1
+soExcMessage=1
+soActCtlsFormClass=1
+soActCtlsFormText=1
+soActCtlsControlClass=1
+soActCtlsControlText=1
+soCmpName=1
+soCmpUser=1
+soCmpTotalMemory=1
+soCmpFreeMemory=1
+soCmpTotalDisk=1
+soCmpFreeDisk=1
+soCmpSysUpTime=1
+soCmpProcessor=1
+soCmpDisplayMode=1
+soOSType=1
+soOSBuildN=1
+soOSUpdate=1
+soOSLanguage=1
+soNetIP=1
+soNetSubmask=1
+soNetGateway=1
+soNetDNS1=1
+soNetDNS2=1
+soNetDHCP=1
+sndShowSendDialog=1
+sndShowSuccessFailureMsg=0
+sndSendEntireLog=0
+sndSendXMLLogCopy=0
+sndSendScreenshot=1
+sndUseOnlyActiveWindow=0
+sndSendLastHTMLPage=1
+sndSendInSeparatedThread=0
+sndAddDateInFileName=0
+sndCompressAllFiles=0
+edoShowExceptionDialog=1
+edoSendEmailChecked=1
+edoAttachScreenshotChecked=1
+edoShowCopyToClipOption=1
+edoShowDetailsButton=1
+edoShowInDetailedMode=0
+edoShowInTopMostMode=0
+edoUseEurekaLogLookAndFeel=0
+csoShowDLLs=1
+csoShowBPLs=1
+csoShowBorlandThreads=1
+csoShowWindowsThreads=1
+csoShowProcedureOffset=0
+boActivateCrashDetection=0
+boPauseBorlandThreads=0
+boDoNotPauseMainThread=0
+boPauseWindowsThreads=0
+boUseMainModuleOptions=1
+boCopyLogInCaseOfError=1
+boSaveCompressedCopyInCaseOfError=0
+Count mtInformationMsgCaption=1
+mtInformationMsgCaption0="Information."
+Count mtQuestionMsgCaption=1
+mtQuestionMsgCaption0="Question."
+Count mtDialog_Caption=1
+mtDialog_Caption0="Error."
+Count mtDialog_ErrorMsgCaption=2
+mtDialog_ErrorMsgCaption0="An error has occurred during program execution."
+mtDialog_ErrorMsgCaption1="Please read the following information for further details."
+Count mtDialog_GeneralCaption=1
+mtDialog_GeneralCaption0="General"
+Count mtDialog_GeneralHeader=1
+mtDialog_GeneralHeader0="General Information"
+Count mtDialog_CallStackCaption=1
+mtDialog_CallStackCaption0="Call Stack"
+Count mtDialog_CallStackHeader=1
+mtDialog_CallStackHeader0="Call Stack Information"
+Count mtDialog_ModulesCaption=1
+mtDialog_ModulesCaption0="Modules"
+Count mtDialog_ModulesHeader=1
+mtDialog_ModulesHeader0="Modules Information"
+Count mtDialog_CPUCaption=1
+mtDialog_CPUCaption0="CPU"
+Count mtDialog_CPUHeader=1
+mtDialog_CPUHeader0="CPU Information"
+Count mtDialog_CustomDataCaption=1
+mtDialog_CustomDataCaption0="Other"
+Count mtDialog_CustomDataHeader=1
+mtDialog_CustomDataHeader0="Other Information"
+Count mtDialog_OKButtonCaption=1
+mtDialog_OKButtonCaption0="&OK"
+Count mtDialog_TerminateButtonCaption=1
+mtDialog_TerminateButtonCaption0="&Terminate"
+Count mtDialog_RestartButtonCaption=1
+mtDialog_RestartButtonCaption0="&Restart"
+Count mtDialog_DetailsButtonCaption=1
+mtDialog_DetailsButtonCaption0="&Details"
+Count mtDialog_SendMessage=1
+mtDialog_SendMessage0="&Send this error via Internet"
+Count mtDialog_ScreenshotMessage=1
+mtDialog_ScreenshotMessage0="&Attach a Screenshot image"
+Count mtDialog_CopyMessage=1
+mtDialog_CopyMessage0="&Copy to Clipboard"
+Count mtDialog_SupportMessage=1
+mtDialog_SupportMessage0="Go to the Support Page"
+Count mtLog_AppHeader=1
+mtLog_AppHeader0="Application"
+Count mtLog_AppStartDate=1
+mtLog_AppStartDate0="Start Date"
+Count mtLog_AppName=1
+mtLog_AppName0="Name/Description"
+Count mtLog_AppVersionNumber=1
+mtLog_AppVersionNumber0="Version Number"
+Count mtLog_AppParameters=1
+mtLog_AppParameters0="Parameters"
+Count mtLog_AppCompilationDate=1
+mtLog_AppCompilationDate0="Compilation Date"
+Count mtLog_ExcHeader=1
+mtLog_ExcHeader0="Exception"
+Count mtLog_ExcDate=1
+mtLog_ExcDate0="Date"
+Count mtLog_ExcAddress=1
+mtLog_ExcAddress0="Address"
+Count mtLog_ExcModule=1
+mtLog_ExcModule0="Module"
+Count mtLog_ExcType=1
+mtLog_ExcType0="Type"
+Count mtLog_ExcMessage=1
+mtLog_ExcMessage0="Message"
+Count mtLog_ActCtrlsHeader=1
+mtLog_ActCtrlsHeader0="Active Controls"
+Count mtLog_ActCtrlsFormClass=1
+mtLog_ActCtrlsFormClass0="Form Class"
+Count mtLog_ActCtrlsFormText=1
+mtLog_ActCtrlsFormText0="Form Text"
+Count mtLog_ActCtrlsControlClass=1
+mtLog_ActCtrlsControlClass0="Control Class"
+Count mtLog_ActCtrlsControlText=1
+mtLog_ActCtrlsControlText0="Control Text"
+Count mtLog_CmpHeader=1
+mtLog_CmpHeader0="Computer"
+Count mtLog_CmpName=1
+mtLog_CmpName0="Name"
+Count mtLog_CmpUser=1
+mtLog_CmpUser0="User"
+Count mtLog_CmpTotalMemory=1
+mtLog_CmpTotalMemory0="Total Memory"
+Count mtLog_CmpFreeMemory=1
+mtLog_CmpFreeMemory0="Free Memory"
+Count mtLog_CmpTotalDisk=1
+mtLog_CmpTotalDisk0="Total Disk"
+Count mtLog_CmpFreeDisk=1
+mtLog_CmpFreeDisk0="Free Disk"
+Count mtLog_CmpSystemUpTime=1
+mtLog_CmpSystemUpTime0="System Up Time"
+Count mtLog_CmpProcessor=1
+mtLog_CmpProcessor0="Processor"
+Count mtLog_CmpDisplayMode=1
+mtLog_CmpDisplayMode0="Display Mode"
+Count mtLog_OSHeader=1
+mtLog_OSHeader0="Operating System"
+Count mtLog_OSType=1
+mtLog_OSType0="Type"
+Count mtLog_OSBuildN=1
+mtLog_OSBuildN0="Build #"
+Count mtLog_OSUpdate=1
+mtLog_OSUpdate0="Update"
+Count mtLog_OSLanguage=1
+mtLog_OSLanguage0="Language"
+Count mtLog_NetHeader=1
+mtLog_NetHeader0="Network"
+Count mtLog_NetIP=1
+mtLog_NetIP0="IP Address"
+Count mtLog_NetSubmask=1
+mtLog_NetSubmask0="Submask"
+Count mtLog_NetGateway=1
+mtLog_NetGateway0="Gateway"
+Count mtLog_NetDNS1=1
+mtLog_NetDNS10="DNS 1"
+Count mtLog_NetDNS2=1
+mtLog_NetDNS20="DNS 2"
+Count mtLog_NetDHCP=1
+mtLog_NetDHCP0="DHCP"
+Count mtLog_CustInfoHeader=1
+mtLog_CustInfoHeader0="Custom Information"
+Count mtCallStack_Address=1
+mtCallStack_Address0="Address"
+Count mtCallStack_Name=1
+mtCallStack_Name0="Module"
+Count mtCallStack_Unit=1
+mtCallStack_Unit0="Unit"
+Count mtCallStack_Class=1
+mtCallStack_Class0="Class"
+Count mtCallStack_Procedure=1
+mtCallStack_Procedure0="Procedure/Method"
+Count mtCallStack_Line=1
+mtCallStack_Line0="Line"
+Count mtCallStack_MainThread=1
+mtCallStack_MainThread0="Main"
+Count mtCallStack_ExceptionThread=1
+mtCallStack_ExceptionThread0="Exception Thread"
+Count mtCallStack_RunningThread=1
+mtCallStack_RunningThread0="Running Thread"
+Count mtCallStack_CallingThread=1
+mtCallStack_CallingThread0="Calling Thread"
+Count mtCallStack_ThreadID=1
+mtCallStack_ThreadID0="ID"
+Count mtCallStack_ThreadPriority=1
+mtCallStack_ThreadPriority0="Priority"
+Count mtCallStack_ThreadClass=1
+mtCallStack_ThreadClass0="Class"
+Count mtSendDialog_Caption=1
+mtSendDialog_Caption0="Send."
+Count mtSendDialog_Message=1
+mtSendDialog_Message0="Message"
+Count mtSendDialog_Resolving=1
+mtSendDialog_Resolving0="Resolving DNS..."
+Count mtSendDialog_Connecting=1
+mtSendDialog_Connecting0="Connecting with server..."
+Count mtSendDialog_Connected=1
+mtSendDialog_Connected0="Connected with server."
+Count mtSendDialog_Sending=1
+mtSendDialog_Sending0="Sending message..."
+Count mtReproduceDialog_Caption=1
+mtReproduceDialog_Caption0="Request"
+Count mtReproduceDialog_Request=1
+mtReproduceDialog_Request0="Please describe the steps to reproduce the error:"
+Count mtReproduceDialog_OKButtonCaption=1
+mtReproduceDialog_OKButtonCaption0="&OK"
+Count mtModules_Handle=1
+mtModules_Handle0="Handle"
+Count mtModules_Name=1
+mtModules_Name0="Name"
+Count mtModules_Description=1
+mtModules_Description0="Description"
+Count mtModules_Version=1
+mtModules_Version0="Version"
+Count mtModules_Size=1
+mtModules_Size0="Size"
+Count mtModules_LastModified=1
+mtModules_LastModified0="Modified"
+Count mtModules_Path=1
+mtModules_Path0="Path"
+Count mtCPU_Registers=1
+mtCPU_Registers0="Registers"
+Count mtCPU_Stack=1
+mtCPU_Stack0="Stack"
+Count mtCPU_MemoryDump=1
+mtCPU_MemoryDump0="Memory Dump"
+Count mtSend_SuccessMsg=1
+mtSend_SuccessMsg0="The message was sent successfully."
+Count mtSend_FailureMsg=1
+mtSend_FailureMsg0="Sorry, sending the message didn't work."
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D7.dpk b/internal/1.0 RC3/1/Delphi/PNG_D7.dpk
new file mode 100644
index 0000000..d9ca89c
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D7.dpk
@@ -0,0 +1,37 @@
+package PNG_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PNG image runtime/designtime'}
+{$IMPLICITBUILD OFF}
+
+requires
+ vcl,
+ rtl;
+
+contains
+ pngimage in '..\Source\pngimage.pas',
+ pnglang in '..\Source\pnglang.pas',
+ pngzlib in '..\Source\pngzlib.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D7.drc b/internal/1.0 RC3/1/Delphi/PNG_D7.drc
new file mode 100644
index 0000000..fd05f5e
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D7.drc
@@ -0,0 +1,62 @@
+/* VER150
+ Generated by the Borland Delphi Pascal Compiler
+ because -GD or --drc was supplied to the compiler.
+
+ This file contains compiler-generated resources that
+ were bound to the executable.
+ If this file is empty, then no compiler-generated
+ resources were bound to the produced executable.
+*/
+
+#define pnglang_EPNGNoImageDataText 65504
+#define pnglang_EPNGCannotChangeSizeText 65505
+#define pnglang_EPNGCannotAddChunkText 65506
+#define pnglang_EPNGCannotAddInvalidImageText 65507
+#define pnglang_EPNGCouldNotLoadResourceText 65508
+#define pnglang_EPNGOutMemoryText 65509
+#define pnglang_EPNGCannotChangeTransparentText 65510
+#define pnglang_EPNGHeaderNotPresentText 65511
+#define pnglang_EPngInvalidCRCText 65520
+#define pnglang_EPNGInvalidIHDRText 65521
+#define pnglang_EPNGMissingMultipleIDATText 65522
+#define pnglang_EPNGZLIBErrorText 65523
+#define pnglang_EPNGInvalidPaletteText 65524
+#define pnglang_EPNGInvalidFileHeaderText 65525
+#define pnglang_EPNGIHDRNotFirstText 65526
+#define pnglang_EPNGNotExistsText 65527
+#define pnglang_EPNGSizeExceedsText 65528
+#define pnglang_EPNGUnknownPalEntryText 65529
+#define pnglang_EPNGMissingPaletteText 65530
+#define pnglang_EPNGUnknownCriticalChunkText 65531
+#define pnglang_EPNGUnknownCompressionText 65532
+#define pnglang_EPNGUnknownInterlaceText 65533
+#define pnglang_EPNGCannotAssignChunkText 65534
+#define pnglang_EPNGUnexpectedEndText 65535
+STRINGTABLE
+BEGIN
+ pnglang_EPNGNoImageDataText, "This \"Portable Network Graphics\" image contains no data."
+ pnglang_EPNGCannotChangeSizeText, "The \"Portable Network Graphics\" image can not be resize by changing width and height properties. Try assigning the image from a bitmap."
+ pnglang_EPNGCannotAddChunkText, "The program tried to add a existent critical chunk to the current image which is not allowed."
+ pnglang_EPNGCannotAddInvalidImageText, "It's not allowed to add a new chunk because the current image is invalid."
+ pnglang_EPNGCouldNotLoadResourceText, "The png image could not be loaded from the resource ID."
+ pnglang_EPNGOutMemoryText, "Some operation could not be performed because the system is out of resources. Close some windows and try again."
+ pnglang_EPNGCannotChangeTransparentText, "Setting bit transparency color is not allowed for png images containing alpha value for each pixel (COLOR_RGBALPHA and COLOR_GRAYSCALEALPHA)"
+ pnglang_EPNGHeaderNotPresentText, "This operation is not valid because the current image contains no valid header."
+ pnglang_EPngInvalidCRCText, "This \"Portable Network Graphics\" image is not valid because it contains invalid pieces of data (crc error)"
+ pnglang_EPNGInvalidIHDRText, "The \"Portable Network Graphics\" image could not be loaded because one of its main piece of data (ihdr) might be corrupted"
+ pnglang_EPNGMissingMultipleIDATText, "This \"Portable Network Graphics\" image is invalid because it has missing image parts."
+ pnglang_EPNGZLIBErrorText, "Could not decompress the image because it contains invalid compressed data.\r\n Description: "
+ pnglang_EPNGInvalidPaletteText, "The \"Portable Network Graphics\" image contains an invalid palette."
+ pnglang_EPNGInvalidFileHeaderText, "The file being readed is not a valid \"Portable Network Graphics\" image because it contains an invalid header. This file may be corruped, try obtaining it again."
+ pnglang_EPNGIHDRNotFirstText, "This \"Portable Network Graphics\" image is not supported or it might be invalid.\r\n(IHDR chunk is not the first)"
+ pnglang_EPNGNotExistsText, "The png file could not be loaded because it does not exists."
+ pnglang_EPNGSizeExceedsText, "This \"Portable Network Graphics\" image is not supported because either it's width or height exceeds the maximum size, which is 65535 pixels length."
+ pnglang_EPNGUnknownPalEntryText, "There is no such palette entry."
+ pnglang_EPNGMissingPaletteText, "This \"Portable Network Graphics\" could not be loaded because it uses a color table which is missing."
+ pnglang_EPNGUnknownCriticalChunkText, "This \"Portable Network Graphics\" image contains an unknown critical part which could not be decoded."
+ pnglang_EPNGUnknownCompressionText, "This \"Portable Network Graphics\" image is encoded with an unknown compression scheme which could not be decoded."
+ pnglang_EPNGUnknownInterlaceText, "This \"Portable Network Graphics\" image uses an unknown interlace scheme which could not be decoded."
+ pnglang_EPNGCannotAssignChunkText, "The chunks must be compatible to be assigned."
+ pnglang_EPNGUnexpectedEndText, "This \"Portable Network Graphics\" image is invalid because the decoder found an unexpected end of the file."
+END
+
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D7.res b/internal/1.0 RC3/1/Delphi/PNG_D7.res
new file mode 100644
index 0000000..3aaf24b
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PNG_D7.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PNG_D9.dpk b/internal/1.0 RC3/1/Delphi/PNG_D9.dpk
new file mode 100644
index 0000000..bd97689
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PNG_D9.dpk
@@ -0,0 +1,36 @@
+package PNG_D9;
+
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$IMPLICITBUILD OFF}
+{$DESCRIPTION 'PNG image runtime/designtime'}
+
+requires
+ vcl,
+ rtl;
+
+contains
+ pngimage in '..\Source\pngimage.pas',
+ pnglang in '..\Source\pnglang.pas',
+ pngzlib in '..\Source\pngzlib.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD10.bdsproj b/internal/1.0 RC3/1/Delphi/PngComponentsD10.bdsproj
new file mode 100644
index 0000000..fc73b7b
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD10.bdsproj
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+ PngComponentsD10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ PNG Components D10 (Runtime)
+
+
+
+ ..\Lib\D10
+
+
+ ..\Lib\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 3082
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+ ExpressBars by Developer Express Inc.
+ ExpressCommonLibrary by Developer Express Inc.
+ ExpressBars DBNavigator by Developer Express Inc.
+ ExpressBars extended DB items by Developer Express Inc.
+ ExpressBars extended items by Developer Express Inc.
+ ExpressDocking Library by Developer Express Inc.
+ ExpressLayout Control by Developer Express Inc.
+ ExpressNavBar by Developer Express Inc.
+ ExpressGDI+ Library by Developer Express Inc.
+ ExpressPrinting System by Developer Express Inc.
+ ExpressSideBar by Developer Express Inc.
+
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD10.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD10.dpk
new file mode 100644
index 0000000..9787b5a
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD10.dpk
@@ -0,0 +1,43 @@
+package PngComponentsD10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PNG Components D10 (Runtime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vclactnband,
+ vcl,
+ rtl,
+ PNG_D10;
+
+contains
+ PngSpeedButton in '..\Source\PngSpeedButton.pas',
+ PngFunctions in '..\Source\PngFunctions.pas',
+ PngImageList in '..\Source\PngImageList.pas',
+ PngBitBtn in '..\Source\PngBitBtn.pas',
+ PngButtonFunctions in '..\Source\PngButtonFunctions.pas',
+ PngCheckListBox in '..\Source\PngCheckListBox.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD10.res b/internal/1.0 RC3/1/Delphi/PngComponentsD10.res
new file mode 100644
index 0000000..86c94e6
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PngComponentsD10.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD10D.bdsproj b/internal/1.0 RC3/1/Delphi/PngComponentsD10D.bdsproj
new file mode 100644
index 0000000..7b767e4
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD10D.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+ PngComponentsD10D.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ PNG Components D10 (Designtime)
+
+
+
+ ..\Lib\D10
+
+
+ ..\Lib\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 3082
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD10D.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD10D.dpk
new file mode 100644
index 0000000..d5318dd
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD10D.dpk
@@ -0,0 +1,40 @@
+package PngComponentsD10D;
+
+{$R *.res}
+{$R '..\Design\PngComponents.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'PNG Components D10 (Designtime)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD ON}
+
+requires
+ designide,
+ PngComponentsD10,
+ PNG_D10;
+
+contains
+ PngComponentsRegister in '..\Design\PngComponentsRegister.pas',
+ PngComponentEditors in '..\Design\PngComponentEditors.pas',
+ PngImageListEditor in '..\Design\PngImageListEditor.pas' {PngImageListEditorDlg};
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD10D.res b/internal/1.0 RC3/1/Delphi/PngComponentsD10D.res
new file mode 100644
index 0000000..86c94e6
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PngComponentsD10D.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5.cfg b/internal/1.0 RC3/1/Delphi/PngComponentsD5.cfg
new file mode 100644
index 0000000..38d4cd9
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5.cfg
@@ -0,0 +1,41 @@
+-$A+
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Lib\D5"
+-LE"..\Lib\D5"
+-LN"..\Lib\D5"
+-U"..\Lib\D5"
+-O"..\Lib\D5"
+-I"..\Lib\D5"
+-R"..\Lib\D5"
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5.dof b/internal/1.0 RC3/1/Delphi/PngComponentsD5.dof
new file mode 100644
index 0000000..abdf849
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5.dof
@@ -0,0 +1,419 @@
+[Compiler]
+A=1
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Png components
+[Directories]
+OutputDir=
+UnitOutputDir=..\Lib\D5
+PackageDLLOutputDir=..\Lib\D5
+PackageDCPOutputDir=..\Lib\D5
+SearchPath=..\Lib\D5
+Packages=Vcl50;Vclx50;VclSmp50;Qrpt50;Vcldb50;Vclbde50;ibevnt50;vcldbx50;TeeUI50;TeeDB50;Tee50;TeeQR50;VCLIB50;vclie50;Inetdb50;Inet50;NMFast50;dclocx50;dclaxserver50;dxEdtrD5;dxcomnD5;EQTLD5;ECQDBCD5;EQDBTLD5;EQGridD5;dxGrEdD5;dxExELD5;dxELibD5;fr5;FRIBX5;RxDB5;cxLibraryVCLD5;dxThemeD5;cxEditorsD5;cxDataD5;cxExtEditorsD5;cxGridD5;cxPageControlD5;cxExportD5;cxIntlD5
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+[Language]
+ActiveLang=
+ProjectLang=$00000C0A
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3082
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[Excluded Packages]
+$(DELPHI)\Projects\Bpl\dxThemeD5.bpl=Express XP Theme Manager by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxDockingD5.bpl=ExpressDocking Library by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxPSCoreD5.bpl=ExpressPrinting System by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxsbd5.bpl=ExpressSideBar by Developer Express Inc.
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlSearchPath]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlUnitOutputDirectory]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlBPLOutput]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlDCPOutput]
+Count=1
+Item0=..\Lib\D5
+[Exception Log]
+EurekaLog Version=519
+Activate=1
+Activate Handle=1
+Save Log File=1
+Foreground Tab=0
+Freeze Activate=0
+Freeze Timeout=0
+Freeze Message=The application seems to be frozen.
+SMTP From=eurekalog@email.com
+SMTP Host=
+SMTP Port=25
+SMTP UserID=
+SMTP Password=
+Append to Log=0
+Show TerminateBtn=1
+TerminateBtn Operation=1
+Errors Number=32
+Errors Terminate=3
+Email Address=
+Email Object=
+Email Send Options=0
+Output Path=
+Encrypt Password=
+AutoCloseDialogSecs=0
+WebSendMode=0
+SupportULR=
+HTMLLayout Count=15
+HTMLLine0="%3Chtml%3E"
+HTMLLine1=" %3Chead%3E"
+HTMLLine2=" %3C/head%3E"
+HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E"
+HTMLLine4=" %3Ctable width="100%%" border="0"%3E"
+HTMLLine5=" %3Ctr%3E"
+HTMLLine6=" %3Ctd nowrap%3E"
+HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E"
+HTMLLine8=" %3C%%HTML_TAG%%%3E"
+HTMLLine9=" %3C/font%3E"
+HTMLLine10=" %3C/td%3E"
+HTMLLine11=" %3C/tr%3E"
+HTMLLine12=" %3C/table%3E"
+HTMLLine13=" %3C/body%3E"
+HTMLLine14="%3C/html%3E"
+AutoCrashOperation=1
+AutoCrashNumber=10
+AutoCrashMinutes=1
+WebURL=
+WebUserID=
+WebPassword=
+WebPort=0
+AttachedFiles=
+Count=0
+EMail Message Line Count=0
+loNoDuplicateErrors=0
+loAppendReproduceText=0
+loDeleteLogAtVersionChange=0
+loAddComputerNameInLogFileName=0
+loSaveModulesSection=1
+loSaveCPUSection=1
+soAppStartDate=1
+soAppName=1
+soAppVersionNumber=1
+soAppParameters=1
+soAppCompilationDate=1
+soExcDate=1
+soExcAddress=1
+soExcModule=1
+soExcType=1
+soExcMessage=1
+soActCtlsFormClass=1
+soActCtlsFormText=1
+soActCtlsControlClass=1
+soActCtlsControlText=1
+soCmpName=1
+soCmpUser=1
+soCmpTotalMemory=1
+soCmpFreeMemory=1
+soCmpTotalDisk=1
+soCmpFreeDisk=1
+soCmpSysUpTime=1
+soCmpProcessor=1
+soCmpDisplayMode=1
+soOSType=1
+soOSBuildN=1
+soOSUpdate=1
+soOSLanguage=1
+soNetIP=1
+soNetSubmask=1
+soNetGateway=1
+soNetDNS1=1
+soNetDNS2=1
+soNetDHCP=1
+sndShowSendDialog=1
+sndShowSuccessFailureMsg=0
+sndSendEntireLog=0
+sndSendXMLLogCopy=0
+sndSendScreenshot=0
+sndUseOnlyActiveWindow=0
+sndSendLastHTMLPage=1
+sndSendInSeparatedThread=0
+sndAddDateInFileName=0
+sndCompressAllFiles=0
+edoShowExceptionDialog=1
+edoSendEmailChecked=1
+edoAttachScreenshotChecked=1
+edoShowCopyToClipOption=1
+edoShowDetailsButton=1
+edoShowInDetailedMode=0
+edoShowInTopMostMode=0
+edoUseEurekaLogLookAndFeel=1
+csoShowDLLs=1
+csoShowBPLs=1
+csoShowBorlandThreads=1
+csoShowWindowsThreads=1
+csoShowProcedureOffset=0
+boActivateCrashDetection=0
+boPauseBorlandThreads=0
+boDoNotPauseMainThread=0
+boPauseWindowsThreads=0
+boUseMainModuleOptions=1
+boCopyLogInCaseOfError=1
+boSaveCompressedCopyInCaseOfError=0
+Count mtInformationMsgCaption=1
+mtInformationMsgCaption0="Information."
+Count mtQuestionMsgCaption=1
+mtQuestionMsgCaption0="Question."
+Count mtDialog_Caption=1
+mtDialog_Caption0="Error."
+Count mtDialog_ErrorMsgCaption=2
+mtDialog_ErrorMsgCaption0="An error has occurred during program execution."
+mtDialog_ErrorMsgCaption1="Please read the following information for further details."
+Count mtDialog_GeneralCaption=1
+mtDialog_GeneralCaption0="General"
+Count mtDialog_GeneralHeader=1
+mtDialog_GeneralHeader0="General Information"
+Count mtDialog_CallStackCaption=1
+mtDialog_CallStackCaption0="Call Stack"
+Count mtDialog_CallStackHeader=1
+mtDialog_CallStackHeader0="Call Stack Information"
+Count mtDialog_ModulesCaption=1
+mtDialog_ModulesCaption0="Modules"
+Count mtDialog_ModulesHeader=1
+mtDialog_ModulesHeader0="Modules Information"
+Count mtDialog_CPUCaption=1
+mtDialog_CPUCaption0="CPU"
+Count mtDialog_CPUHeader=1
+mtDialog_CPUHeader0="CPU Information"
+Count mtDialog_CustomDataCaption=1
+mtDialog_CustomDataCaption0="Other"
+Count mtDialog_CustomDataHeader=1
+mtDialog_CustomDataHeader0="Other Information"
+Count mtDialog_OKButtonCaption=1
+mtDialog_OKButtonCaption0="%26OK"
+Count mtDialog_TerminateButtonCaption=1
+mtDialog_TerminateButtonCaption0="%26Terminate"
+Count mtDialog_RestartButtonCaption=1
+mtDialog_RestartButtonCaption0="%26Restart"
+Count mtDialog_DetailsButtonCaption=1
+mtDialog_DetailsButtonCaption0="%26Details"
+Count mtDialog_SendMessage=1
+mtDialog_SendMessage0="%26Send this error via Internet"
+Count mtDialog_ScreenshotMessage=1
+mtDialog_ScreenshotMessage0="%26Attach a Screenshot image"
+Count mtDialog_CopyMessage=1
+mtDialog_CopyMessage0="%26Copy to Clipboard"
+Count mtDialog_SupportMessage=1
+mtDialog_SupportMessage0="Go to the Support Page"
+Count mtLog_AppHeader=1
+mtLog_AppHeader0="Application"
+Count mtLog_AppStartDate=1
+mtLog_AppStartDate0="Start Date"
+Count mtLog_AppName=1
+mtLog_AppName0="Name/Description"
+Count mtLog_AppVersionNumber=1
+mtLog_AppVersionNumber0="Version Number"
+Count mtLog_AppParameters=1
+mtLog_AppParameters0="Parameters"
+Count mtLog_AppCompilationDate=1
+mtLog_AppCompilationDate0="Compilation Date"
+Count mtLog_ExcHeader=1
+mtLog_ExcHeader0="Exception"
+Count mtLog_ExcDate=1
+mtLog_ExcDate0="Date"
+Count mtLog_ExcAddress=1
+mtLog_ExcAddress0="Address"
+Count mtLog_ExcModule=1
+mtLog_ExcModule0="Module"
+Count mtLog_ExcType=1
+mtLog_ExcType0="Type"
+Count mtLog_ExcMessage=1
+mtLog_ExcMessage0="Message"
+Count mtLog_ActCtrlsHeader=1
+mtLog_ActCtrlsHeader0="Active Controls"
+Count mtLog_ActCtrlsFormClass=1
+mtLog_ActCtrlsFormClass0="Form Class"
+Count mtLog_ActCtrlsFormText=1
+mtLog_ActCtrlsFormText0="Form Text"
+Count mtLog_ActCtrlsControlClass=1
+mtLog_ActCtrlsControlClass0="Control Class"
+Count mtLog_ActCtrlsControlText=1
+mtLog_ActCtrlsControlText0="Control Text"
+Count mtLog_CmpHeader=1
+mtLog_CmpHeader0="Computer"
+Count mtLog_CmpName=1
+mtLog_CmpName0="Name"
+Count mtLog_CmpUser=1
+mtLog_CmpUser0="User"
+Count mtLog_CmpTotalMemory=1
+mtLog_CmpTotalMemory0="Total Memory"
+Count mtLog_CmpFreeMemory=1
+mtLog_CmpFreeMemory0="Free Memory"
+Count mtLog_CmpTotalDisk=1
+mtLog_CmpTotalDisk0="Total Disk"
+Count mtLog_CmpFreeDisk=1
+mtLog_CmpFreeDisk0="Free Disk"
+Count mtLog_CmpSystemUpTime=1
+mtLog_CmpSystemUpTime0="System Up Time"
+Count mtLog_CmpProcessor=1
+mtLog_CmpProcessor0="Processor"
+Count mtLog_CmpDisplayMode=1
+mtLog_CmpDisplayMode0="Display Mode"
+Count mtLog_OSHeader=1
+mtLog_OSHeader0="Operating System"
+Count mtLog_OSType=1
+mtLog_OSType0="Type"
+Count mtLog_OSBuildN=1
+mtLog_OSBuildN0="Build #"
+Count mtLog_OSUpdate=1
+mtLog_OSUpdate0="Update"
+Count mtLog_OSLanguage=1
+mtLog_OSLanguage0="Language"
+Count mtLog_NetHeader=1
+mtLog_NetHeader0="Network"
+Count mtLog_NetIP=1
+mtLog_NetIP0="IP Address"
+Count mtLog_NetSubmask=1
+mtLog_NetSubmask0="Submask"
+Count mtLog_NetGateway=1
+mtLog_NetGateway0="Gateway"
+Count mtLog_NetDNS1=1
+mtLog_NetDNS10="DNS 1"
+Count mtLog_NetDNS2=1
+mtLog_NetDNS20="DNS 2"
+Count mtLog_NetDHCP=1
+mtLog_NetDHCP0="DHCP"
+Count mtLog_CustInfoHeader=1
+mtLog_CustInfoHeader0="Custom Information"
+Count mtCallStack_Address=1
+mtCallStack_Address0="Address"
+Count mtCallStack_Name=1
+mtCallStack_Name0="Module"
+Count mtCallStack_Unit=1
+mtCallStack_Unit0="Unit"
+Count mtCallStack_Class=1
+mtCallStack_Class0="Class"
+Count mtCallStack_Procedure=1
+mtCallStack_Procedure0="Procedure/Method"
+Count mtCallStack_Line=1
+mtCallStack_Line0="Line"
+Count mtCallStack_MainThread=1
+mtCallStack_MainThread0="Main"
+Count mtCallStack_ExceptionThread=1
+mtCallStack_ExceptionThread0="Exception Thread"
+Count mtCallStack_RunningThread=1
+mtCallStack_RunningThread0="Running Thread"
+Count mtCallStack_CallingThread=1
+mtCallStack_CallingThread0="Calling Thread"
+Count mtCallStack_ThreadID=1
+mtCallStack_ThreadID0="ID"
+Count mtCallStack_ThreadPriority=1
+mtCallStack_ThreadPriority0="Priority"
+Count mtCallStack_ThreadClass=1
+mtCallStack_ThreadClass0="Class"
+Count mtSendDialog_Caption=1
+mtSendDialog_Caption0="Send."
+Count mtSendDialog_Message=1
+mtSendDialog_Message0="Message"
+Count mtSendDialog_Resolving=1
+mtSendDialog_Resolving0="Resolving DNS..."
+Count mtSendDialog_Connecting=1
+mtSendDialog_Connecting0="Connecting with server..."
+Count mtSendDialog_Connected=1
+mtSendDialog_Connected0="Connected with server."
+Count mtSendDialog_Sending=1
+mtSendDialog_Sending0="Sending message..."
+Count mtReproduceDialog_Caption=1
+mtReproduceDialog_Caption0="Request"
+Count mtReproduceDialog_Request=1
+mtReproduceDialog_Request0="Please describe the steps to reproduce the error:"
+Count mtReproduceDialog_OKButtonCaption=1
+mtReproduceDialog_OKButtonCaption0="%26OK"
+Count mtModules_Handle=1
+mtModules_Handle0="Handle"
+Count mtModules_Name=1
+mtModules_Name0="Name"
+Count mtModules_Description=1
+mtModules_Description0="Description"
+Count mtModules_Version=1
+mtModules_Version0="Version"
+Count mtModules_Size=1
+mtModules_Size0="Size"
+Count mtModules_LastModified=1
+mtModules_LastModified0="Modified"
+Count mtModules_Path=1
+mtModules_Path0="Path"
+Count mtCPU_Registers=1
+mtCPU_Registers0="Registers"
+Count mtCPU_Stack=1
+mtCPU_Stack0="Stack"
+Count mtCPU_MemoryDump=1
+mtCPU_MemoryDump0="Memory Dump"
+Count mtSend_SuccessMsg=1
+mtSend_SuccessMsg0="The message was sent successfully."
+Count mtSend_FailureMsg=1
+mtSend_FailureMsg0="Sorry, sending the message didn't work."
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD5.dpk
new file mode 100644
index 0000000..0455bfc
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5.dpk
@@ -0,0 +1,41 @@
+package PngComponentsD5;
+
+{$R *.RES}
+{$ALIGN ON}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Png components'}
+{$RUNONLY}
+{$IMPLICITBUILD ON}
+
+requires
+ PNG_D5,
+ VCLX50;
+
+contains
+ PngSpeedButton in '..\Source\PngSpeedButton.pas',
+ PngFunctions in '..\Source\PngFunctions.pas',
+ PngImageList in '..\Source\PngImageList.pas',
+ PngBitBtn in '..\Source\PngBitBtn.pas',
+ PngButtonFunctions in '..\Source\PngButtonFunctions.pas',
+ PngCheckListBox in '..\Source\PngCheckListBox.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5.drc b/internal/1.0 RC3/1/Delphi/PngComponentsD5.drc
new file mode 100644
index 0000000..2fa06e6
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5.drc
@@ -0,0 +1,13 @@
+/* VER130
+ Generated by the Borland Delphi Pascal Compiler
+ because -GD or --drc was supplied to the compiler.
+
+ It contains compiler-generated resource bound to the executable.
+ If it is empty, no compiler-generated resources were bound to the
+ produced executable.
+*/
+
+STRINGTABLE
+BEGIN
+END
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5.res b/internal/1.0 RC3/1/Delphi/PngComponentsD5.res
new file mode 100644
index 0000000..244ee50
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PngComponentsD5.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5D.cfg b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.cfg
new file mode 100644
index 0000000..38d4cd9
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.cfg
@@ -0,0 +1,41 @@
+-$A+
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Lib\D5"
+-LE"..\Lib\D5"
+-LN"..\Lib\D5"
+-U"..\Lib\D5"
+-O"..\Lib\D5"
+-I"..\Lib\D5"
+-R"..\Lib\D5"
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5D.dof b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.dof
new file mode 100644
index 0000000..48cb29d
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.dof
@@ -0,0 +1,419 @@
+[Compiler]
+A=1
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Png components designtime
+[Directories]
+OutputDir=
+UnitOutputDir=..\Lib\D5
+PackageDLLOutputDir=..\Lib\D5
+PackageDCPOutputDir=..\Lib\D5
+SearchPath=..\Lib\D5
+Packages=Vcl50;Vclx50;VclSmp50;Qrpt50;Vcldb50;Vclbde50;ibevnt50;vcldbx50;TeeUI50;TeeDB50;Tee50;TeeQR50;VCLIB50;vclie50;Inetdb50;Inet50;NMFast50;dclocx50;dclaxserver50;dxEdtrD5;dxcomnD5;EQTLD5;ECQDBCD5;EQDBTLD5;EQGridD5;dxGrEdD5;dxExELD5;dxELibD5;fr5;FRIBX5;RxDB5;cxLibraryVCLD5;dxThemeD5;cxEditorsD5;cxDataD5;cxExtEditorsD5;cxGridD5;cxPageControlD5;cxExportD5;cxIntlD5
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+[Language]
+ActiveLang=
+ProjectLang=$00000C0A
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3082
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[Excluded Packages]
+$(DELPHI)\Projects\Bpl\dxThemeD5.bpl=Express XP Theme Manager by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxDockingD5.bpl=ExpressDocking Library by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxPSCoreD5.bpl=ExpressPrinting System by Developer Express Inc.
+$(DELPHI)\Projects\Bpl\dxsbd5.bpl=ExpressSideBar by Developer Express Inc.
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlSearchPath]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlUnitOutputDirectory]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlBPLOutput]
+Count=1
+Item0=..\Lib\D5
+[HistoryLists\hlDCPOutput]
+Count=1
+Item0=..\Lib\D5
+[Exception Log]
+EurekaLog Version=519
+Activate=1
+Activate Handle=1
+Save Log File=1
+Foreground Tab=0
+Freeze Activate=0
+Freeze Timeout=0
+Freeze Message=The application seems to be frozen.
+SMTP From=eurekalog@email.com
+SMTP Host=
+SMTP Port=25
+SMTP UserID=
+SMTP Password=
+Append to Log=0
+Show TerminateBtn=1
+TerminateBtn Operation=1
+Errors Number=32
+Errors Terminate=3
+Email Address=
+Email Object=
+Email Send Options=0
+Output Path=
+Encrypt Password=
+AutoCloseDialogSecs=0
+WebSendMode=0
+SupportULR=
+HTMLLayout Count=15
+HTMLLine0="%3Chtml%3E"
+HTMLLine1=" %3Chead%3E"
+HTMLLine2=" %3C/head%3E"
+HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E"
+HTMLLine4=" %3Ctable width="100%%" border="0"%3E"
+HTMLLine5=" %3Ctr%3E"
+HTMLLine6=" %3Ctd nowrap%3E"
+HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E"
+HTMLLine8=" %3C%%HTML_TAG%%%3E"
+HTMLLine9=" %3C/font%3E"
+HTMLLine10=" %3C/td%3E"
+HTMLLine11=" %3C/tr%3E"
+HTMLLine12=" %3C/table%3E"
+HTMLLine13=" %3C/body%3E"
+HTMLLine14="%3C/html%3E"
+AutoCrashOperation=1
+AutoCrashNumber=10
+AutoCrashMinutes=1
+WebURL=
+WebUserID=
+WebPassword=
+WebPort=0
+AttachedFiles=
+Count=0
+EMail Message Line Count=0
+loNoDuplicateErrors=0
+loAppendReproduceText=0
+loDeleteLogAtVersionChange=0
+loAddComputerNameInLogFileName=0
+loSaveModulesSection=1
+loSaveCPUSection=1
+soAppStartDate=1
+soAppName=1
+soAppVersionNumber=1
+soAppParameters=1
+soAppCompilationDate=1
+soExcDate=1
+soExcAddress=1
+soExcModule=1
+soExcType=1
+soExcMessage=1
+soActCtlsFormClass=1
+soActCtlsFormText=1
+soActCtlsControlClass=1
+soActCtlsControlText=1
+soCmpName=1
+soCmpUser=1
+soCmpTotalMemory=1
+soCmpFreeMemory=1
+soCmpTotalDisk=1
+soCmpFreeDisk=1
+soCmpSysUpTime=1
+soCmpProcessor=1
+soCmpDisplayMode=1
+soOSType=1
+soOSBuildN=1
+soOSUpdate=1
+soOSLanguage=1
+soNetIP=1
+soNetSubmask=1
+soNetGateway=1
+soNetDNS1=1
+soNetDNS2=1
+soNetDHCP=1
+sndShowSendDialog=1
+sndShowSuccessFailureMsg=0
+sndSendEntireLog=0
+sndSendXMLLogCopy=0
+sndSendScreenshot=0
+sndUseOnlyActiveWindow=0
+sndSendLastHTMLPage=1
+sndSendInSeparatedThread=0
+sndAddDateInFileName=0
+sndCompressAllFiles=0
+edoShowExceptionDialog=1
+edoSendEmailChecked=1
+edoAttachScreenshotChecked=1
+edoShowCopyToClipOption=1
+edoShowDetailsButton=1
+edoShowInDetailedMode=0
+edoShowInTopMostMode=0
+edoUseEurekaLogLookAndFeel=1
+csoShowDLLs=1
+csoShowBPLs=1
+csoShowBorlandThreads=1
+csoShowWindowsThreads=1
+csoShowProcedureOffset=0
+boActivateCrashDetection=0
+boPauseBorlandThreads=0
+boDoNotPauseMainThread=0
+boPauseWindowsThreads=0
+boUseMainModuleOptions=1
+boCopyLogInCaseOfError=1
+boSaveCompressedCopyInCaseOfError=0
+Count mtInformationMsgCaption=1
+mtInformationMsgCaption0="Information."
+Count mtQuestionMsgCaption=1
+mtQuestionMsgCaption0="Question."
+Count mtDialog_Caption=1
+mtDialog_Caption0="Error."
+Count mtDialog_ErrorMsgCaption=2
+mtDialog_ErrorMsgCaption0="An error has occurred during program execution."
+mtDialog_ErrorMsgCaption1="Please read the following information for further details."
+Count mtDialog_GeneralCaption=1
+mtDialog_GeneralCaption0="General"
+Count mtDialog_GeneralHeader=1
+mtDialog_GeneralHeader0="General Information"
+Count mtDialog_CallStackCaption=1
+mtDialog_CallStackCaption0="Call Stack"
+Count mtDialog_CallStackHeader=1
+mtDialog_CallStackHeader0="Call Stack Information"
+Count mtDialog_ModulesCaption=1
+mtDialog_ModulesCaption0="Modules"
+Count mtDialog_ModulesHeader=1
+mtDialog_ModulesHeader0="Modules Information"
+Count mtDialog_CPUCaption=1
+mtDialog_CPUCaption0="CPU"
+Count mtDialog_CPUHeader=1
+mtDialog_CPUHeader0="CPU Information"
+Count mtDialog_CustomDataCaption=1
+mtDialog_CustomDataCaption0="Other"
+Count mtDialog_CustomDataHeader=1
+mtDialog_CustomDataHeader0="Other Information"
+Count mtDialog_OKButtonCaption=1
+mtDialog_OKButtonCaption0="%26OK"
+Count mtDialog_TerminateButtonCaption=1
+mtDialog_TerminateButtonCaption0="%26Terminate"
+Count mtDialog_RestartButtonCaption=1
+mtDialog_RestartButtonCaption0="%26Restart"
+Count mtDialog_DetailsButtonCaption=1
+mtDialog_DetailsButtonCaption0="%26Details"
+Count mtDialog_SendMessage=1
+mtDialog_SendMessage0="%26Send this error via Internet"
+Count mtDialog_ScreenshotMessage=1
+mtDialog_ScreenshotMessage0="%26Attach a Screenshot image"
+Count mtDialog_CopyMessage=1
+mtDialog_CopyMessage0="%26Copy to Clipboard"
+Count mtDialog_SupportMessage=1
+mtDialog_SupportMessage0="Go to the Support Page"
+Count mtLog_AppHeader=1
+mtLog_AppHeader0="Application"
+Count mtLog_AppStartDate=1
+mtLog_AppStartDate0="Start Date"
+Count mtLog_AppName=1
+mtLog_AppName0="Name/Description"
+Count mtLog_AppVersionNumber=1
+mtLog_AppVersionNumber0="Version Number"
+Count mtLog_AppParameters=1
+mtLog_AppParameters0="Parameters"
+Count mtLog_AppCompilationDate=1
+mtLog_AppCompilationDate0="Compilation Date"
+Count mtLog_ExcHeader=1
+mtLog_ExcHeader0="Exception"
+Count mtLog_ExcDate=1
+mtLog_ExcDate0="Date"
+Count mtLog_ExcAddress=1
+mtLog_ExcAddress0="Address"
+Count mtLog_ExcModule=1
+mtLog_ExcModule0="Module"
+Count mtLog_ExcType=1
+mtLog_ExcType0="Type"
+Count mtLog_ExcMessage=1
+mtLog_ExcMessage0="Message"
+Count mtLog_ActCtrlsHeader=1
+mtLog_ActCtrlsHeader0="Active Controls"
+Count mtLog_ActCtrlsFormClass=1
+mtLog_ActCtrlsFormClass0="Form Class"
+Count mtLog_ActCtrlsFormText=1
+mtLog_ActCtrlsFormText0="Form Text"
+Count mtLog_ActCtrlsControlClass=1
+mtLog_ActCtrlsControlClass0="Control Class"
+Count mtLog_ActCtrlsControlText=1
+mtLog_ActCtrlsControlText0="Control Text"
+Count mtLog_CmpHeader=1
+mtLog_CmpHeader0="Computer"
+Count mtLog_CmpName=1
+mtLog_CmpName0="Name"
+Count mtLog_CmpUser=1
+mtLog_CmpUser0="User"
+Count mtLog_CmpTotalMemory=1
+mtLog_CmpTotalMemory0="Total Memory"
+Count mtLog_CmpFreeMemory=1
+mtLog_CmpFreeMemory0="Free Memory"
+Count mtLog_CmpTotalDisk=1
+mtLog_CmpTotalDisk0="Total Disk"
+Count mtLog_CmpFreeDisk=1
+mtLog_CmpFreeDisk0="Free Disk"
+Count mtLog_CmpSystemUpTime=1
+mtLog_CmpSystemUpTime0="System Up Time"
+Count mtLog_CmpProcessor=1
+mtLog_CmpProcessor0="Processor"
+Count mtLog_CmpDisplayMode=1
+mtLog_CmpDisplayMode0="Display Mode"
+Count mtLog_OSHeader=1
+mtLog_OSHeader0="Operating System"
+Count mtLog_OSType=1
+mtLog_OSType0="Type"
+Count mtLog_OSBuildN=1
+mtLog_OSBuildN0="Build #"
+Count mtLog_OSUpdate=1
+mtLog_OSUpdate0="Update"
+Count mtLog_OSLanguage=1
+mtLog_OSLanguage0="Language"
+Count mtLog_NetHeader=1
+mtLog_NetHeader0="Network"
+Count mtLog_NetIP=1
+mtLog_NetIP0="IP Address"
+Count mtLog_NetSubmask=1
+mtLog_NetSubmask0="Submask"
+Count mtLog_NetGateway=1
+mtLog_NetGateway0="Gateway"
+Count mtLog_NetDNS1=1
+mtLog_NetDNS10="DNS 1"
+Count mtLog_NetDNS2=1
+mtLog_NetDNS20="DNS 2"
+Count mtLog_NetDHCP=1
+mtLog_NetDHCP0="DHCP"
+Count mtLog_CustInfoHeader=1
+mtLog_CustInfoHeader0="Custom Information"
+Count mtCallStack_Address=1
+mtCallStack_Address0="Address"
+Count mtCallStack_Name=1
+mtCallStack_Name0="Module"
+Count mtCallStack_Unit=1
+mtCallStack_Unit0="Unit"
+Count mtCallStack_Class=1
+mtCallStack_Class0="Class"
+Count mtCallStack_Procedure=1
+mtCallStack_Procedure0="Procedure/Method"
+Count mtCallStack_Line=1
+mtCallStack_Line0="Line"
+Count mtCallStack_MainThread=1
+mtCallStack_MainThread0="Main"
+Count mtCallStack_ExceptionThread=1
+mtCallStack_ExceptionThread0="Exception Thread"
+Count mtCallStack_RunningThread=1
+mtCallStack_RunningThread0="Running Thread"
+Count mtCallStack_CallingThread=1
+mtCallStack_CallingThread0="Calling Thread"
+Count mtCallStack_ThreadID=1
+mtCallStack_ThreadID0="ID"
+Count mtCallStack_ThreadPriority=1
+mtCallStack_ThreadPriority0="Priority"
+Count mtCallStack_ThreadClass=1
+mtCallStack_ThreadClass0="Class"
+Count mtSendDialog_Caption=1
+mtSendDialog_Caption0="Send."
+Count mtSendDialog_Message=1
+mtSendDialog_Message0="Message"
+Count mtSendDialog_Resolving=1
+mtSendDialog_Resolving0="Resolving DNS..."
+Count mtSendDialog_Connecting=1
+mtSendDialog_Connecting0="Connecting with server..."
+Count mtSendDialog_Connected=1
+mtSendDialog_Connected0="Connected with server."
+Count mtSendDialog_Sending=1
+mtSendDialog_Sending0="Sending message..."
+Count mtReproduceDialog_Caption=1
+mtReproduceDialog_Caption0="Request"
+Count mtReproduceDialog_Request=1
+mtReproduceDialog_Request0="Please describe the steps to reproduce the error:"
+Count mtReproduceDialog_OKButtonCaption=1
+mtReproduceDialog_OKButtonCaption0="%26OK"
+Count mtModules_Handle=1
+mtModules_Handle0="Handle"
+Count mtModules_Name=1
+mtModules_Name0="Name"
+Count mtModules_Description=1
+mtModules_Description0="Description"
+Count mtModules_Version=1
+mtModules_Version0="Version"
+Count mtModules_Size=1
+mtModules_Size0="Size"
+Count mtModules_LastModified=1
+mtModules_LastModified0="Modified"
+Count mtModules_Path=1
+mtModules_Path0="Path"
+Count mtCPU_Registers=1
+mtCPU_Registers0="Registers"
+Count mtCPU_Stack=1
+mtCPU_Stack0="Stack"
+Count mtCPU_MemoryDump=1
+mtCPU_MemoryDump0="Memory Dump"
+Count mtSend_SuccessMsg=1
+mtSend_SuccessMsg0="The message was sent successfully."
+Count mtSend_FailureMsg=1
+mtSend_FailureMsg0="Sorry, sending the message didn't work."
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5D.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.dpk
new file mode 100644
index 0000000..14e2ab3
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.dpk
@@ -0,0 +1,38 @@
+package PngComponentsD5D;
+
+{$R *.RES}
+{$R '..\Design\PngComponents.dcr'}
+{$ALIGN ON}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Png components designtime'}
+{$DESIGNONLY}
+{$IMPLICITBUILD ON}
+
+requires
+ PngComponentsD5;
+
+contains
+ PngComponentsRegister in '..\Design\PngComponentsRegister.pas',
+ PngComponentEditors in '..\Design\PngComponentEditors.pas',
+ PngImageListEditor in '..\Design\PngImageListEditor.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5D.drc b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.drc
new file mode 100644
index 0000000..2fa06e6
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.drc
@@ -0,0 +1,13 @@
+/* VER130
+ Generated by the Borland Delphi Pascal Compiler
+ because -GD or --drc was supplied to the compiler.
+
+ It contains compiler-generated resource bound to the executable.
+ If it is empty, no compiler-generated resources were bound to the
+ produced executable.
+*/
+
+STRINGTABLE
+BEGIN
+END
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD5D.res b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.res
new file mode 100644
index 0000000..244ee50
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PngComponentsD5D.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD6.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD6.dpk
new file mode 100644
index 0000000..9d3d1ff
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD6.dpk
@@ -0,0 +1,41 @@
+package PngComponentsD6;
+
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$IMPLICITBUILD OFF}
+{$DESCRIPTION 'Png components'}
+
+requires
+ rtl,
+ vcl,
+ vclx,
+ PNG_D6;
+
+contains
+ PngSpeedButton in '..\Source\PngSpeedButton.pas',
+ PngButtonFunctions in '..\Source\PngButtonFunctions.pas',
+ PngCheckListBox in '..\Source\PngCheckListBox.pas',
+ PngFunctions in '..\Source\PngFunctions.pas',
+ PngImageList in '..\Source\PngImageList.pas',
+ PngBitBtn in '..\Source\PngBitBtn.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD6D.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD6D.dpk
new file mode 100644
index 0000000..7d28ee9
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD6D.dpk
@@ -0,0 +1,37 @@
+package PngComponentsD6D;
+
+{$R '..\Design\PngComponents.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$IMPLICITBUILD OFF}
+{$DESCRIPTION 'Png components designtime'}
+
+requires
+ designide,
+ PngComponentsD6;
+
+contains
+ PngImageListEditor in '..\Design\PngImageListEditor.pas',
+ PngComponentsRegister in '..\Design\PngComponentsRegister.pas',
+ PngComponentEditors in '..\Design\PngComponentEditors.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7.cfg b/internal/1.0 RC3/1/Delphi/PngComponentsD7.cfg
new file mode 100644
index 0000000..f556c82
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\archivos de programa\borland\delphi7\Projects\Bpl"
+-LN"c:\archivos de programa\borland\delphi7\Projects\Bpl"
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7.dof b/internal/1.0 RC3/1/Delphi/PngComponentsD7.dof
new file mode 100644
index 0000000..eec229c
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7.dof
@@ -0,0 +1,464 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Png components
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;CEToolsPkgd7;FR7;FRIBX7;Hydra_Core_D7;Hydra_RO_D7;fqb70;frx7;frxADO7;frxBDE7;frxDB7;frxDBX7;frxe7;frxIBX7;fs7;fsADO7;fsBDE7;fsDB7;fsIBX7;DataAbstract_Core_D7;DataAbstract_IDE_D7;dxComnD7;dxsbD7;dxBarD7;dxBarDBNavD7;dxBarExtDBItemsD7;dxBarExtItemsD7;dxDockingD7;cxEditorsVCLD7;cxLibraryVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxGridVCLD7;cxPageControlVCLD7;cxSchedulerVCLD7;cxTreeListVCLD7;dxPSCoreD7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=C:\Archivos de programa\Borland\Delphi7\Bin\
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3082
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[Excluded Packages]
+C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\DJclVcl70.bpl=JEDI Code Library VCL package for Delphi 7
+C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\DJcl70.bpl=JEDI Code Library RTL package for Delphi 7
+C:\WINDOWS\system32\fqb70.bpl=FastQueryBuilder 1.01
+C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\dxPSCoreD7.bpl=ExpressPrinting System (core 3.1) by Developer Express Inc.
+C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\dxComnD7.bpl=ExpressCommonLibrary by Developer Express Inc.
+c:\archivos de programa\borland\delphi7\Projects\Bpl\EasyResizeD7.bpl=EasyResize for Delphi 7
+c:\archivos de programa\borland\delphi7\Projects\Bpl\RodaxFrameD7.bpl=Frames Acana (D7)
+[Exception Log]
+EurekaLog Version=501
+Activate=1
+Activate Handle=1
+Save Log File=1
+Foreground Tab=0
+Freeze Activate=0
+Freeze Timeout=60
+Freeze Message=The application seems to be frozen.
+SMTP From=eurekalog@email.com
+SMTP Host=
+SMTP Port=25
+SMTP UserID=
+SMTP Password=
+Append to Log=0
+Show TerminateBtn=1
+TerminateBtn Operation=1
+Errors Number=32
+Errors Terminate=3
+Email Address=
+Email Object=
+Email Send Options=0
+Output Path=
+Encrypt Password=
+AutoCloseDialogSecs=0
+WebSendMode=0
+SupportULR=
+HTMLLayout Count=15
+HTMLLine0="%3Chtml%3E"
+HTMLLine1=" %3Chead%3E"
+HTMLLine2=" %3C/head%3E"
+HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E"
+HTMLLine4=" %3Ctable width="100%%" border="0"%3E"
+HTMLLine5=" %3Ctr%3E"
+HTMLLine6=" %3Ctd nowrap%3E"
+HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E"
+HTMLLine8=" %3C%%HTML_TAG%%%3E"
+HTMLLine9=" %3C/font%3E"
+HTMLLine10=" %3C/td%3E"
+HTMLLine11=" %3C/tr%3E"
+HTMLLine12=" %3C/table%3E"
+HTMLLine13=" %3C/body%3E"
+HTMLLine14="%3C/html%3E"
+AutoCrashOperation=1
+AutoCrashNumber=10
+AutoCrashMinutes=1
+WebURL=
+WebUserID=
+WebPassword=
+WebPort=0
+AttachedFiles=
+Count=0
+EMail Message Line Count=0
+loNoDuplicateErrors=0
+loAppendReproduceText=0
+loDeleteLogAtVersionChange=0
+loAddComputerNameInLogFileName=0
+loSaveModulesSection=1
+loSaveCPUSection=1
+soAppStartDate=1
+soAppName=1
+soAppVersionNumber=1
+soAppParameters=1
+soAppCompilationDate=1
+soExcDate=1
+soExcAddress=1
+soExcModule=1
+soExcType=1
+soExcMessage=1
+soActCtlsFormClass=1
+soActCtlsFormText=1
+soActCtlsControlClass=1
+soActCtlsControlText=1
+soCmpName=1
+soCmpUser=1
+soCmpTotalMemory=1
+soCmpFreeMemory=1
+soCmpTotalDisk=1
+soCmpFreeDisk=1
+soCmpSysUpTime=1
+soCmpProcessor=1
+soCmpDisplayMode=1
+soOSType=1
+soOSBuildN=1
+soOSUpdate=1
+soOSLanguage=1
+soNetIP=1
+soNetSubmask=1
+soNetGateway=1
+soNetDNS1=1
+soNetDNS2=1
+soNetDHCP=1
+sndShowSendDialog=1
+sndShowSuccessFailureMsg=0
+sndSendEntireLog=0
+sndSendXMLLogCopy=0
+sndSendScreenshot=1
+sndUseOnlyActiveWindow=0
+sndSendLastHTMLPage=1
+sndSendInSeparatedThread=0
+sndAddDateInFileName=0
+sndCompressAllFiles=0
+edoShowExceptionDialog=1
+edoSendEmailChecked=1
+edoAttachScreenshotChecked=1
+edoShowCopyToClipOption=1
+edoShowDetailsButton=1
+edoShowInDetailedMode=0
+edoShowInTopMostMode=0
+edoUseEurekaLogLookAndFeel=0
+csoShowDLLs=1
+csoShowBPLs=1
+csoShowBorlandThreads=1
+csoShowWindowsThreads=1
+csoShowProcedureOffset=0
+boActivateCrashDetection=0
+boPauseBorlandThreads=0
+boDoNotPauseMainThread=0
+boPauseWindowsThreads=0
+boUseMainModuleOptions=1
+boCopyLogInCaseOfError=1
+boSaveCompressedCopyInCaseOfError=0
+Count mtInformationMsgCaption=1
+mtInformationMsgCaption0="Information."
+Count mtQuestionMsgCaption=1
+mtQuestionMsgCaption0="Question."
+Count mtDialog_Caption=1
+mtDialog_Caption0="Error."
+Count mtDialog_ErrorMsgCaption=2
+mtDialog_ErrorMsgCaption0="An error has occurred during program execution."
+mtDialog_ErrorMsgCaption1="Please read the following information for further details."
+Count mtDialog_GeneralCaption=1
+mtDialog_GeneralCaption0="General"
+Count mtDialog_GeneralHeader=1
+mtDialog_GeneralHeader0="General Information"
+Count mtDialog_CallStackCaption=1
+mtDialog_CallStackCaption0="Call Stack"
+Count mtDialog_CallStackHeader=1
+mtDialog_CallStackHeader0="Call Stack Information"
+Count mtDialog_ModulesCaption=1
+mtDialog_ModulesCaption0="Modules"
+Count mtDialog_ModulesHeader=1
+mtDialog_ModulesHeader0="Modules Information"
+Count mtDialog_CPUCaption=1
+mtDialog_CPUCaption0="CPU"
+Count mtDialog_CPUHeader=1
+mtDialog_CPUHeader0="CPU Information"
+Count mtDialog_CustomDataCaption=1
+mtDialog_CustomDataCaption0="Other"
+Count mtDialog_CustomDataHeader=1
+mtDialog_CustomDataHeader0="Other Information"
+Count mtDialog_OKButtonCaption=1
+mtDialog_OKButtonCaption0="&OK"
+Count mtDialog_TerminateButtonCaption=1
+mtDialog_TerminateButtonCaption0="&Terminate"
+Count mtDialog_RestartButtonCaption=1
+mtDialog_RestartButtonCaption0="&Restart"
+Count mtDialog_DetailsButtonCaption=1
+mtDialog_DetailsButtonCaption0="&Details"
+Count mtDialog_SendMessage=1
+mtDialog_SendMessage0="&Send this error via Internet"
+Count mtDialog_ScreenshotMessage=1
+mtDialog_ScreenshotMessage0="&Attach a Screenshot image"
+Count mtDialog_CopyMessage=1
+mtDialog_CopyMessage0="&Copy to Clipboard"
+Count mtDialog_SupportMessage=1
+mtDialog_SupportMessage0="Go to the Support Page"
+Count mtLog_AppHeader=1
+mtLog_AppHeader0="Application"
+Count mtLog_AppStartDate=1
+mtLog_AppStartDate0="Start Date"
+Count mtLog_AppName=1
+mtLog_AppName0="Name/Description"
+Count mtLog_AppVersionNumber=1
+mtLog_AppVersionNumber0="Version Number"
+Count mtLog_AppParameters=1
+mtLog_AppParameters0="Parameters"
+Count mtLog_AppCompilationDate=1
+mtLog_AppCompilationDate0="Compilation Date"
+Count mtLog_ExcHeader=1
+mtLog_ExcHeader0="Exception"
+Count mtLog_ExcDate=1
+mtLog_ExcDate0="Date"
+Count mtLog_ExcAddress=1
+mtLog_ExcAddress0="Address"
+Count mtLog_ExcModule=1
+mtLog_ExcModule0="Module"
+Count mtLog_ExcType=1
+mtLog_ExcType0="Type"
+Count mtLog_ExcMessage=1
+mtLog_ExcMessage0="Message"
+Count mtLog_ActCtrlsHeader=1
+mtLog_ActCtrlsHeader0="Active Controls"
+Count mtLog_ActCtrlsFormClass=1
+mtLog_ActCtrlsFormClass0="Form Class"
+Count mtLog_ActCtrlsFormText=1
+mtLog_ActCtrlsFormText0="Form Text"
+Count mtLog_ActCtrlsControlClass=1
+mtLog_ActCtrlsControlClass0="Control Class"
+Count mtLog_ActCtrlsControlText=1
+mtLog_ActCtrlsControlText0="Control Text"
+Count mtLog_CmpHeader=1
+mtLog_CmpHeader0="Computer"
+Count mtLog_CmpName=1
+mtLog_CmpName0="Name"
+Count mtLog_CmpUser=1
+mtLog_CmpUser0="User"
+Count mtLog_CmpTotalMemory=1
+mtLog_CmpTotalMemory0="Total Memory"
+Count mtLog_CmpFreeMemory=1
+mtLog_CmpFreeMemory0="Free Memory"
+Count mtLog_CmpTotalDisk=1
+mtLog_CmpTotalDisk0="Total Disk"
+Count mtLog_CmpFreeDisk=1
+mtLog_CmpFreeDisk0="Free Disk"
+Count mtLog_CmpSystemUpTime=1
+mtLog_CmpSystemUpTime0="System Up Time"
+Count mtLog_CmpProcessor=1
+mtLog_CmpProcessor0="Processor"
+Count mtLog_CmpDisplayMode=1
+mtLog_CmpDisplayMode0="Display Mode"
+Count mtLog_OSHeader=1
+mtLog_OSHeader0="Operating System"
+Count mtLog_OSType=1
+mtLog_OSType0="Type"
+Count mtLog_OSBuildN=1
+mtLog_OSBuildN0="Build #"
+Count mtLog_OSUpdate=1
+mtLog_OSUpdate0="Update"
+Count mtLog_OSLanguage=1
+mtLog_OSLanguage0="Language"
+Count mtLog_NetHeader=1
+mtLog_NetHeader0="Network"
+Count mtLog_NetIP=1
+mtLog_NetIP0="IP Address"
+Count mtLog_NetSubmask=1
+mtLog_NetSubmask0="Submask"
+Count mtLog_NetGateway=1
+mtLog_NetGateway0="Gateway"
+Count mtLog_NetDNS1=1
+mtLog_NetDNS10="DNS 1"
+Count mtLog_NetDNS2=1
+mtLog_NetDNS20="DNS 2"
+Count mtLog_NetDHCP=1
+mtLog_NetDHCP0="DHCP"
+Count mtLog_CustInfoHeader=1
+mtLog_CustInfoHeader0="Custom Information"
+Count mtCallStack_Address=1
+mtCallStack_Address0="Address"
+Count mtCallStack_Name=1
+mtCallStack_Name0="Module"
+Count mtCallStack_Unit=1
+mtCallStack_Unit0="Unit"
+Count mtCallStack_Class=1
+mtCallStack_Class0="Class"
+Count mtCallStack_Procedure=1
+mtCallStack_Procedure0="Procedure/Method"
+Count mtCallStack_Line=1
+mtCallStack_Line0="Line"
+Count mtCallStack_MainThread=1
+mtCallStack_MainThread0="Main"
+Count mtCallStack_ExceptionThread=1
+mtCallStack_ExceptionThread0="Exception Thread"
+Count mtCallStack_RunningThread=1
+mtCallStack_RunningThread0="Running Thread"
+Count mtCallStack_CallingThread=1
+mtCallStack_CallingThread0="Calling Thread"
+Count mtCallStack_ThreadID=1
+mtCallStack_ThreadID0="ID"
+Count mtCallStack_ThreadPriority=1
+mtCallStack_ThreadPriority0="Priority"
+Count mtCallStack_ThreadClass=1
+mtCallStack_ThreadClass0="Class"
+Count mtSendDialog_Caption=1
+mtSendDialog_Caption0="Send."
+Count mtSendDialog_Message=1
+mtSendDialog_Message0="Message"
+Count mtSendDialog_Resolving=1
+mtSendDialog_Resolving0="Resolving DNS..."
+Count mtSendDialog_Connecting=1
+mtSendDialog_Connecting0="Connecting with server..."
+Count mtSendDialog_Connected=1
+mtSendDialog_Connected0="Connected with server."
+Count mtSendDialog_Sending=1
+mtSendDialog_Sending0="Sending message..."
+Count mtReproduceDialog_Caption=1
+mtReproduceDialog_Caption0="Request"
+Count mtReproduceDialog_Request=1
+mtReproduceDialog_Request0="Please describe the steps to reproduce the error:"
+Count mtReproduceDialog_OKButtonCaption=1
+mtReproduceDialog_OKButtonCaption0="&OK"
+Count mtModules_Handle=1
+mtModules_Handle0="Handle"
+Count mtModules_Name=1
+mtModules_Name0="Name"
+Count mtModules_Description=1
+mtModules_Description0="Description"
+Count mtModules_Version=1
+mtModules_Version0="Version"
+Count mtModules_Size=1
+mtModules_Size0="Size"
+Count mtModules_LastModified=1
+mtModules_LastModified0="Modified"
+Count mtModules_Path=1
+mtModules_Path0="Path"
+Count mtCPU_Registers=1
+mtCPU_Registers0="Registers"
+Count mtCPU_Stack=1
+mtCPU_Stack0="Stack"
+Count mtCPU_MemoryDump=1
+mtCPU_MemoryDump0="Memory Dump"
+Count mtSend_SuccessMsg=1
+mtSend_SuccessMsg0="The message was sent successfully."
+Count mtSend_FailureMsg=1
+mtSend_FailureMsg0="Sorry, sending the message didn't work."
+
+
+n=´fÒ
+´fÒ
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD7.dpk
new file mode 100644
index 0000000..b9f780c
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7.dpk
@@ -0,0 +1,43 @@
+package PngComponentsD7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Png components'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ vclactnband,
+ vcl,
+ rtl,
+ PNG_D7;
+
+contains
+ PngSpeedButton in '..\Source\PngSpeedButton.pas',
+ PngFunctions in '..\Source\PngFunctions.pas',
+ PngImageList in '..\Source\PngImageList.pas',
+ PngBitBtn in '..\Source\PngBitBtn.pas',
+ PngButtonFunctions in '..\Source\PngButtonFunctions.pas',
+ PngCheckListBox in '..\Source\PngCheckListBox.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7.drc b/internal/1.0 RC3/1/Delphi/PngComponentsD7.drc
new file mode 100644
index 0000000..a5d5271
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7.drc
@@ -0,0 +1,14 @@
+/* VER150
+ Generated by the Borland Delphi Pascal Compiler
+ because -GD or --drc was supplied to the compiler.
+
+ This file contains compiler-generated resources that
+ were bound to the executable.
+ If this file is empty, then no compiler-generated
+ resources were bound to the produced executable.
+*/
+
+STRINGTABLE
+BEGIN
+END
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7.res b/internal/1.0 RC3/1/Delphi/PngComponentsD7.res
new file mode 100644
index 0000000..ec5f233
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PngComponentsD7.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7D.cfg b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.cfg
new file mode 100644
index 0000000..fa59e2f
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.cfg
@@ -0,0 +1,39 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\archivos de programa\borland\delphi7\Projects\Bpl"
+-LN"c:\archivos de programa\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7D.dof b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.dof
new file mode 100644
index 0000000..c69c088
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.dof
@@ -0,0 +1,471 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Png components designtime
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;CEToolsPkgd7;FR7;FRIBX7;Hydra_Core_D7;Hydra_RO_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=C:\Archivos de programa\Borland\Delphi7\Bin\
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=3082
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[Excluded Packages]
+c:\archivos de programa\borland\delphi7\Projects\Bpl\RodaxFrameD7.bpl=Frames Acana (D7)
+C:\Archivos de programa\Developer Express Inc\ExpressFlowChart\LibD7\dcldxFlowChartD7.bpl=ExpressFlowChart by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressOrgChart\LibD7\dcldxOrgCD7.bpl=ExpressOrgChart by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressOrgChart\LibD7\dcldxDBOrD7.bpl=ExpressDBOrgChart by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressMasterView\LibD7\dcldxMasterViewD7.bpl=ExpressMasterView by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxFCLnkD7.bpl=ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxMVLnkD7.bpl=ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxOCLnkD7.bpl=ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBOCLnkD7.bpl=ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressBars 5\LibD7\dcldxBarExtItemsD7.bpl=ExpressBars extended items by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressLayout Control\LibD7\dxLayoutControldxEditAdaptersD7.bpl=ExpressLayoutControl Adapters for ExpressEditors Library by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBGrLnkD7.bpl=ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBTLLnkD7.bpl=ExpressPrinting System ReportLink for ExpressQuantumDBTreeList by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxInsLnkD7.bpl=ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxOILnkD7.bpl=ExpressPrinting System ReportLink for ExpressRTTIInspector by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSPrVwAdvD7.bpl=ExpressPrinting System Advanced Preview Window by Developer Express Inc.
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7\dxPSTLLnkD7.bpl=ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc.
+[Exception Log]
+EurekaLog Version=501
+Activate=1
+Activate Handle=1
+Save Log File=1
+Foreground Tab=0
+Freeze Activate=0
+Freeze Timeout=60
+Freeze Message=The application seems to be frozen.
+SMTP From=eurekalog@email.com
+SMTP Host=
+SMTP Port=25
+SMTP UserID=
+SMTP Password=
+Append to Log=0
+Show TerminateBtn=1
+TerminateBtn Operation=1
+Errors Number=32
+Errors Terminate=3
+Email Address=
+Email Object=
+Email Send Options=0
+Output Path=
+Encrypt Password=
+AutoCloseDialogSecs=0
+WebSendMode=0
+SupportULR=
+HTMLLayout Count=15
+HTMLLine0="%3Chtml%3E"
+HTMLLine1=" %3Chead%3E"
+HTMLLine2=" %3C/head%3E"
+HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E"
+HTMLLine4=" %3Ctable width="100%%" border="0"%3E"
+HTMLLine5=" %3Ctr%3E"
+HTMLLine6=" %3Ctd nowrap%3E"
+HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E"
+HTMLLine8=" %3C%%HTML_TAG%%%3E"
+HTMLLine9=" %3C/font%3E"
+HTMLLine10=" %3C/td%3E"
+HTMLLine11=" %3C/tr%3E"
+HTMLLine12=" %3C/table%3E"
+HTMLLine13=" %3C/body%3E"
+HTMLLine14="%3C/html%3E"
+AutoCrashOperation=1
+AutoCrashNumber=10
+AutoCrashMinutes=1
+WebURL=
+WebUserID=
+WebPassword=
+WebPort=0
+AttachedFiles=
+Count=0
+EMail Message Line Count=0
+loNoDuplicateErrors=0
+loAppendReproduceText=0
+loDeleteLogAtVersionChange=0
+loAddComputerNameInLogFileName=0
+loSaveModulesSection=1
+loSaveCPUSection=1
+soAppStartDate=1
+soAppName=1
+soAppVersionNumber=1
+soAppParameters=1
+soAppCompilationDate=1
+soExcDate=1
+soExcAddress=1
+soExcModule=1
+soExcType=1
+soExcMessage=1
+soActCtlsFormClass=1
+soActCtlsFormText=1
+soActCtlsControlClass=1
+soActCtlsControlText=1
+soCmpName=1
+soCmpUser=1
+soCmpTotalMemory=1
+soCmpFreeMemory=1
+soCmpTotalDisk=1
+soCmpFreeDisk=1
+soCmpSysUpTime=1
+soCmpProcessor=1
+soCmpDisplayMode=1
+soOSType=1
+soOSBuildN=1
+soOSUpdate=1
+soOSLanguage=1
+soNetIP=1
+soNetSubmask=1
+soNetGateway=1
+soNetDNS1=1
+soNetDNS2=1
+soNetDHCP=1
+sndShowSendDialog=1
+sndShowSuccessFailureMsg=0
+sndSendEntireLog=0
+sndSendXMLLogCopy=0
+sndSendScreenshot=1
+sndUseOnlyActiveWindow=0
+sndSendLastHTMLPage=1
+sndSendInSeparatedThread=0
+sndAddDateInFileName=0
+sndCompressAllFiles=0
+edoShowExceptionDialog=1
+edoSendEmailChecked=1
+edoAttachScreenshotChecked=1
+edoShowCopyToClipOption=1
+edoShowDetailsButton=1
+edoShowInDetailedMode=0
+edoShowInTopMostMode=0
+edoUseEurekaLogLookAndFeel=0
+csoShowDLLs=1
+csoShowBPLs=1
+csoShowBorlandThreads=1
+csoShowWindowsThreads=1
+csoShowProcedureOffset=0
+boActivateCrashDetection=0
+boPauseBorlandThreads=0
+boDoNotPauseMainThread=0
+boPauseWindowsThreads=0
+boUseMainModuleOptions=1
+boCopyLogInCaseOfError=1
+boSaveCompressedCopyInCaseOfError=0
+Count mtInformationMsgCaption=1
+mtInformationMsgCaption0="Information."
+Count mtQuestionMsgCaption=1
+mtQuestionMsgCaption0="Question."
+Count mtDialog_Caption=1
+mtDialog_Caption0="Error."
+Count mtDialog_ErrorMsgCaption=2
+mtDialog_ErrorMsgCaption0="An error has occurred during program execution."
+mtDialog_ErrorMsgCaption1="Please read the following information for further details."
+Count mtDialog_GeneralCaption=1
+mtDialog_GeneralCaption0="General"
+Count mtDialog_GeneralHeader=1
+mtDialog_GeneralHeader0="General Information"
+Count mtDialog_CallStackCaption=1
+mtDialog_CallStackCaption0="Call Stack"
+Count mtDialog_CallStackHeader=1
+mtDialog_CallStackHeader0="Call Stack Information"
+Count mtDialog_ModulesCaption=1
+mtDialog_ModulesCaption0="Modules"
+Count mtDialog_ModulesHeader=1
+mtDialog_ModulesHeader0="Modules Information"
+Count mtDialog_CPUCaption=1
+mtDialog_CPUCaption0="CPU"
+Count mtDialog_CPUHeader=1
+mtDialog_CPUHeader0="CPU Information"
+Count mtDialog_CustomDataCaption=1
+mtDialog_CustomDataCaption0="Other"
+Count mtDialog_CustomDataHeader=1
+mtDialog_CustomDataHeader0="Other Information"
+Count mtDialog_OKButtonCaption=1
+mtDialog_OKButtonCaption0="&OK"
+Count mtDialog_TerminateButtonCaption=1
+mtDialog_TerminateButtonCaption0="&Terminate"
+Count mtDialog_RestartButtonCaption=1
+mtDialog_RestartButtonCaption0="&Restart"
+Count mtDialog_DetailsButtonCaption=1
+mtDialog_DetailsButtonCaption0="&Details"
+Count mtDialog_SendMessage=1
+mtDialog_SendMessage0="&Send this error via Internet"
+Count mtDialog_ScreenshotMessage=1
+mtDialog_ScreenshotMessage0="&Attach a Screenshot image"
+Count mtDialog_CopyMessage=1
+mtDialog_CopyMessage0="&Copy to Clipboard"
+Count mtDialog_SupportMessage=1
+mtDialog_SupportMessage0="Go to the Support Page"
+Count mtLog_AppHeader=1
+mtLog_AppHeader0="Application"
+Count mtLog_AppStartDate=1
+mtLog_AppStartDate0="Start Date"
+Count mtLog_AppName=1
+mtLog_AppName0="Name/Description"
+Count mtLog_AppVersionNumber=1
+mtLog_AppVersionNumber0="Version Number"
+Count mtLog_AppParameters=1
+mtLog_AppParameters0="Parameters"
+Count mtLog_AppCompilationDate=1
+mtLog_AppCompilationDate0="Compilation Date"
+Count mtLog_ExcHeader=1
+mtLog_ExcHeader0="Exception"
+Count mtLog_ExcDate=1
+mtLog_ExcDate0="Date"
+Count mtLog_ExcAddress=1
+mtLog_ExcAddress0="Address"
+Count mtLog_ExcModule=1
+mtLog_ExcModule0="Module"
+Count mtLog_ExcType=1
+mtLog_ExcType0="Type"
+Count mtLog_ExcMessage=1
+mtLog_ExcMessage0="Message"
+Count mtLog_ActCtrlsHeader=1
+mtLog_ActCtrlsHeader0="Active Controls"
+Count mtLog_ActCtrlsFormClass=1
+mtLog_ActCtrlsFormClass0="Form Class"
+Count mtLog_ActCtrlsFormText=1
+mtLog_ActCtrlsFormText0="Form Text"
+Count mtLog_ActCtrlsControlClass=1
+mtLog_ActCtrlsControlClass0="Control Class"
+Count mtLog_ActCtrlsControlText=1
+mtLog_ActCtrlsControlText0="Control Text"
+Count mtLog_CmpHeader=1
+mtLog_CmpHeader0="Computer"
+Count mtLog_CmpName=1
+mtLog_CmpName0="Name"
+Count mtLog_CmpUser=1
+mtLog_CmpUser0="User"
+Count mtLog_CmpTotalMemory=1
+mtLog_CmpTotalMemory0="Total Memory"
+Count mtLog_CmpFreeMemory=1
+mtLog_CmpFreeMemory0="Free Memory"
+Count mtLog_CmpTotalDisk=1
+mtLog_CmpTotalDisk0="Total Disk"
+Count mtLog_CmpFreeDisk=1
+mtLog_CmpFreeDisk0="Free Disk"
+Count mtLog_CmpSystemUpTime=1
+mtLog_CmpSystemUpTime0="System Up Time"
+Count mtLog_CmpProcessor=1
+mtLog_CmpProcessor0="Processor"
+Count mtLog_CmpDisplayMode=1
+mtLog_CmpDisplayMode0="Display Mode"
+Count mtLog_OSHeader=1
+mtLog_OSHeader0="Operating System"
+Count mtLog_OSType=1
+mtLog_OSType0="Type"
+Count mtLog_OSBuildN=1
+mtLog_OSBuildN0="Build #"
+Count mtLog_OSUpdate=1
+mtLog_OSUpdate0="Update"
+Count mtLog_OSLanguage=1
+mtLog_OSLanguage0="Language"
+Count mtLog_NetHeader=1
+mtLog_NetHeader0="Network"
+Count mtLog_NetIP=1
+mtLog_NetIP0="IP Address"
+Count mtLog_NetSubmask=1
+mtLog_NetSubmask0="Submask"
+Count mtLog_NetGateway=1
+mtLog_NetGateway0="Gateway"
+Count mtLog_NetDNS1=1
+mtLog_NetDNS10="DNS 1"
+Count mtLog_NetDNS2=1
+mtLog_NetDNS20="DNS 2"
+Count mtLog_NetDHCP=1
+mtLog_NetDHCP0="DHCP"
+Count mtLog_CustInfoHeader=1
+mtLog_CustInfoHeader0="Custom Information"
+Count mtCallStack_Address=1
+mtCallStack_Address0="Address"
+Count mtCallStack_Name=1
+mtCallStack_Name0="Module"
+Count mtCallStack_Unit=1
+mtCallStack_Unit0="Unit"
+Count mtCallStack_Class=1
+mtCallStack_Class0="Class"
+Count mtCallStack_Procedure=1
+mtCallStack_Procedure0="Procedure/Method"
+Count mtCallStack_Line=1
+mtCallStack_Line0="Line"
+Count mtCallStack_MainThread=1
+mtCallStack_MainThread0="Main"
+Count mtCallStack_ExceptionThread=1
+mtCallStack_ExceptionThread0="Exception Thread"
+Count mtCallStack_RunningThread=1
+mtCallStack_RunningThread0="Running Thread"
+Count mtCallStack_CallingThread=1
+mtCallStack_CallingThread0="Calling Thread"
+Count mtCallStack_ThreadID=1
+mtCallStack_ThreadID0="ID"
+Count mtCallStack_ThreadPriority=1
+mtCallStack_ThreadPriority0="Priority"
+Count mtCallStack_ThreadClass=1
+mtCallStack_ThreadClass0="Class"
+Count mtSendDialog_Caption=1
+mtSendDialog_Caption0="Send."
+Count mtSendDialog_Message=1
+mtSendDialog_Message0="Message"
+Count mtSendDialog_Resolving=1
+mtSendDialog_Resolving0="Resolving DNS..."
+Count mtSendDialog_Connecting=1
+mtSendDialog_Connecting0="Connecting with server..."
+Count mtSendDialog_Connected=1
+mtSendDialog_Connected0="Connected with server."
+Count mtSendDialog_Sending=1
+mtSendDialog_Sending0="Sending message..."
+Count mtReproduceDialog_Caption=1
+mtReproduceDialog_Caption0="Request"
+Count mtReproduceDialog_Request=1
+mtReproduceDialog_Request0="Please describe the steps to reproduce the error:"
+Count mtReproduceDialog_OKButtonCaption=1
+mtReproduceDialog_OKButtonCaption0="&OK"
+Count mtModules_Handle=1
+mtModules_Handle0="Handle"
+Count mtModules_Name=1
+mtModules_Name0="Name"
+Count mtModules_Description=1
+mtModules_Description0="Description"
+Count mtModules_Version=1
+mtModules_Version0="Version"
+Count mtModules_Size=1
+mtModules_Size0="Size"
+Count mtModules_LastModified=1
+mtModules_LastModified0="Modified"
+Count mtModules_Path=1
+mtModules_Path0="Path"
+Count mtCPU_Registers=1
+mtCPU_Registers0="Registers"
+Count mtCPU_Stack=1
+mtCPU_Stack0="Stack"
+Count mtCPU_MemoryDump=1
+mtCPU_MemoryDump0="Memory Dump"
+Count mtSend_SuccessMsg=1
+mtSend_SuccessMsg0="The message was sent successfully."
+Count mtSend_FailureMsg=1
+mtSend_FailureMsg0="Sorry, sending the message didn't work."
+
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7D.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.dpk
new file mode 100644
index 0000000..c43d9a3
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.dpk
@@ -0,0 +1,39 @@
+package PngComponentsD7D;
+
+{$R *.res}
+{$R '..\Design\PngComponents.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Png components designtime'}
+{$DESIGNONLY}
+{$IMPLICITBUILD ON}
+
+requires
+ designide,
+ PngComponentsD7;
+
+contains
+ PngComponentsRegister in '..\Design\PngComponentsRegister.pas',
+ PngComponentEditors in '..\Design\PngComponentEditors.pas',
+ PngImageListEditor in '..\Design\PngImageListEditor.pas' {PngImageListEditorDlg};
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7D.drc b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.drc
new file mode 100644
index 0000000..a5d5271
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.drc
@@ -0,0 +1,14 @@
+/* VER150
+ Generated by the Borland Delphi Pascal Compiler
+ because -GD or --drc was supplied to the compiler.
+
+ This file contains compiler-generated resources that
+ were bound to the executable.
+ If this file is empty, then no compiler-generated
+ resources were bound to the produced executable.
+*/
+
+STRINGTABLE
+BEGIN
+END
+
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD7D.res b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.res
new file mode 100644
index 0000000..3aaf24b
Binary files /dev/null and b/internal/1.0 RC3/1/Delphi/PngComponentsD7D.res differ
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD9.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD9.dpk
new file mode 100644
index 0000000..e9658a8
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD9.dpk
@@ -0,0 +1,42 @@
+package PngComponentsD9;
+
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Png components'}
+{$RUNONLY}
+{$IMPLICITBUILD ON}
+
+requires
+ vclactnband,
+ vcl,
+ rtl,
+ PNG_D9;
+
+contains
+ PngSpeedButton in '..\Source\PngSpeedButton.pas',
+ PngFunctions in '..\Source\PngFunctions.pas',
+ PngImageList in '..\Source\PngImageList.pas',
+ PngBitBtn in '..\Source\PngBitBtn.pas',
+ PngButtonFunctions in '..\Source\PngButtonFunctions.pas',
+ PngCheckListBox in '..\Source\PngCheckListBox.pas';
+
+end.
diff --git a/internal/1.0 RC3/1/Delphi/PngComponentsD9D.dpk b/internal/1.0 RC3/1/Delphi/PngComponentsD9D.dpk
new file mode 100644
index 0000000..4fde779
--- /dev/null
+++ b/internal/1.0 RC3/1/Delphi/PngComponentsD9D.dpk
@@ -0,0 +1,38 @@
+package PngComponentsD9D;
+
+{$R '..\Design\PngComponents.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Png components designtime'}
+{$DESIGNONLY}
+{$IMPLICITBUILD ON}
+
+requires
+ designide,
+ PngComponentsD9;
+
+contains
+ PngComponentsRegister in '..\Design\PngComponentsRegister.pas',
+ PngComponentEditors in '..\Design\PngComponentEditors.pas',
+ PngImageListEditor in '..\Design\PngImageListEditor.pas' {PngImageListEditorDlg};
+
+end.
diff --git a/internal/1.0 RC3/1/Design/PngComponentEditors.pas b/internal/1.0 RC3/1/Design/PngComponentEditors.pas
new file mode 100644
index 0000000..83a58ac
--- /dev/null
+++ b/internal/1.0 RC3/1/Design/PngComponentEditors.pas
@@ -0,0 +1,275 @@
+unit PngComponentEditors;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, SysUtils, Forms, Classes, Controls, PngImageList, TypInfo,
+ {$IFDEF THANY_COMPILER_6_UP} DesignIntf, DesignEditors, ColnEdit {$ELSE} DsgnIntf {$ENDIF};
+
+type
+ {$IFNDEF THANY_COMPILER_6_UP}
+ IProperty = TPropertyEditor;
+ IDesignerSelections = TDesignerSelectionList;
+ IDesigner = IFormDesigner;
+
+ TThanyComponentEditor = class(TComponentEditor)
+ public
+ function GetComponent: TComponent;
+ end;
+ {$ELSE}
+ TThanyComponentEditor = TComponentEditor;
+ {$ENDIF}
+
+ TPngImageListEditor = class(TThanyComponentEditor)
+ public
+ function GetVerbCount: Integer; override;
+ function GetVerb(Index: Integer): string; override;
+ procedure ExecuteVerb(Index: Integer); override;
+ procedure Edit; override;
+ end;
+
+ TPngImageCollectionEditor = class(TThanyComponentEditor)
+ public
+ procedure Edit; override;
+ function GetVerbCount: Integer; override;
+ function GetVerb(Index: Integer): string; override;
+ procedure ExecuteVerb(Index: Integer); override;
+ end;
+
+ TPngButtonEditor = class(TThanyComponentEditor)
+ public
+ function GetVerbCount: Integer; override;
+ function GetVerb(Index: Integer): string; override;
+ procedure ExecuteVerb(Index: Integer); override;
+ procedure Edit; override;
+ end;
+
+ TPngImageListImagesEditor = class(TStringProperty)
+ public
+ function GetValue: string; override;
+ function GetAttributes: TPropertyAttributes; override;
+ procedure Edit; override;
+ end;
+
+ TPngImageCollectionItemsEditor = class(TPngImageListImagesEditor)
+ public
+ procedure Edit; override;
+ end;
+
+ TEditProperty = class
+ private
+ FPropery: string;
+ procedure EnumProperty({$IFDEF THANY_COMPILER_6_UP}const{$ENDIF} Prop: IProperty);
+ public
+ constructor Create(Component: TComponent; const Prop: string; Designer: IDesigner);
+ end;
+
+implementation
+
+uses PngImageListEditor;
+
+//This type is neccesary to be able to call CopyPngs without having to make it
+//public in the TPngImageList class.
+type
+ TPngImageListAccess = class(TPngImageList)
+ public
+ procedure CopyPngs; override;
+ end;
+
+procedure EditProperty(Component: TComponent; const Prop: string; Designer: IDesigner);
+begin
+TEditProperty.Create(Component, Prop, Designer).Free;
+end;
+
+{ TPngImageListAccess }
+
+procedure TPngImageListAccess.CopyPngs;
+begin
+inherited CopyPngs;
+end;
+
+{ TPngImageListEditor }
+
+procedure TPngImageListEditor.Edit;
+var
+ Component: TPngImageList;
+begin
+Component := GetComponent as TPngImageList;
+EditProperty(Component, 'PngImages', Designer);
+end;
+
+procedure TPngImageListEditor.ExecuteVerb(Index: Integer);
+begin
+case Index of
+ 0: Edit;
+ 1: begin
+ TPngImageListAccess(GetComponent).CopyPngs;
+ MessageBox(0, 'The PNG objects have been copied to the internal imagelist.', PChar(string(GetComponent.ClassName)), MB_ICONINFORMATION or MB_OK);
+ end;
+ end;
+end;
+
+function TPngImageListEditor.GetVerb(Index: Integer): string;
+begin
+case Index of
+ 0: Result := '&Edit images...';
+ 1: Result := '&Recreate images...';
+ end;
+end;
+
+function TPngImageListEditor.GetVerbCount: Integer;
+begin
+Result := 2;
+end;
+
+{ TPngImageCollectionEditor }
+
+procedure TPngImageCollectionEditor.Edit;
+var
+ Component: TPngImageCollection;
+begin
+Component := GetComponent as TPngImageCollection;
+EditProperty(Component, 'Items', Designer);
+end;
+
+procedure TPngImageCollectionEditor.ExecuteVerb(Index: Integer);
+begin
+Edit;
+end;
+
+function TPngImageCollectionEditor.GetVerb(Index: Integer): string;
+begin
+Result := '&Edit images...';
+end;
+
+function TPngImageCollectionEditor.GetVerbCount: Integer;
+begin
+Result := 1;
+end;
+
+{ TPngButtonEditor }
+
+procedure TPngButtonEditor.ExecuteVerb(Index: Integer);
+begin
+EditProperty(GetComponent, 'PngImage', Designer);
+end;
+
+function TPngButtonEditor.GetVerb(Index: Integer): string;
+begin
+Result := '&Edit image...';
+end;
+
+function TPngButtonEditor.GetVerbCount: Integer;
+begin
+Result := 1;
+end;
+
+procedure TPngButtonEditor.Edit;
+begin
+EditProperty(GetComponent, 'OnClick', Designer);
+end;
+
+{ TD5ComponentEditor }
+
+{$IFNDEF THANY_COMPILER_6_UP}
+
+function TThanyComponentEditor.GetComponent: TComponent;
+begin
+Result := Component;
+end;
+
+{$ENDIF}
+
+{ TEditProperty }
+
+{$IFDEF THANY_COMPILER_6_UP}
+
+constructor TEditProperty.Create(Component: TComponent; const Prop: string; Designer: IDesigner);
+var
+ Components: IDesignerSelections;
+begin
+inherited Create;
+FPropery := Prop;
+Components := TDesignerSelections.Create;
+Components.Add(Component);
+GetComponentProperties(Components, tkAny, Designer, EnumProperty);
+end;
+
+{$ELSE}
+
+constructor TEditProperty.Create(Component: TComponent; const Prop: string; Designer: IDesigner);
+var
+ Components: TDesignerSelectionList;
+begin
+inherited Create;
+FPropery := Prop;
+Components := TDesignerSelectionList.Create;
+try
+ Components.Add(Component);
+ GetComponentProperties(Components, tkAny, Designer, EnumProperty);
+finally
+ Components.Free;
+ end;
+end;
+
+{$ENDIF}
+
+procedure TEditProperty.EnumProperty({$IFDEF THANY_COMPILER_6_UP}const{$ENDIF} Prop: IProperty);
+begin
+if Prop.GetName = FPropery
+then Prop.Edit;
+end;
+
+{ TPngImageListImagesEditor }
+
+procedure TPngImageListImagesEditor.Edit;
+var
+ ImageList: TPngImageList;
+begin
+with TPngImageListEditorDlg.Create(nil)
+do begin
+ ImageList := TPngImageList(Self.GetComponent(0));
+ Caption := 'Editing ' + ImageList.Name + '.' + Self.GetName;
+ Images.Items.Assign(ImageList.PngImages);
+ ImageWidth := ImageList.Width;
+ ImageHeight := ImageList.Height;
+ if ShowModal = mrOK
+ then begin
+ ImageList.PngImages.Assign(Images.Items);
+ Self.Designer.Modified;
+ end;
+ end;
+end;
+
+function TPngImageListImagesEditor.GetAttributes: TPropertyAttributes;
+begin
+Result := inherited GetAttributes + [paDialog, paReadOnly];
+end;
+
+function TPngImageListImagesEditor.GetValue: string;
+begin
+Result := '(PNG images)';
+end;
+
+{ TPngImageCollectionItemsEditor }
+
+procedure TPngImageCollectionItemsEditor.Edit;
+var
+ Collection: TPngImageCollection;
+begin
+with TPngImageListEditorDlg.Create(nil)
+do begin
+ Collection := TPngImageCollection(Self.GetComponent(0));
+ Caption := 'Editing ' + Collection.Name + '.' + Self.GetName;
+ Images.Items.Assign(Collection.Items);
+ if ShowModal = mrOK
+ then begin
+ Collection.Items.Assign(Images.Items);
+ Self.Designer.Modified;
+ end;
+ end;
+end;
+
+end.
diff --git a/internal/1.0 RC3/1/Design/PngComponents.dcr b/internal/1.0 RC3/1/Design/PngComponents.dcr
new file mode 100644
index 0000000..83ad90b
Binary files /dev/null and b/internal/1.0 RC3/1/Design/PngComponents.dcr differ
diff --git a/internal/1.0 RC3/1/Design/PngComponentsRegister.pas b/internal/1.0 RC3/1/Design/PngComponentsRegister.pas
new file mode 100644
index 0000000..2bd0225
--- /dev/null
+++ b/internal/1.0 RC3/1/Design/PngComponentsRegister.pas
@@ -0,0 +1,51 @@
+unit PngComponentsRegister;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Classes, {$IFDEF THANY_COMPILER_6_UP} DesignIntf {$ELSE} DsgnIntf {$ENDIF},
+ PngSpeedButton, PngBitBtn, PngImageList, PngCheckListBox, PngComponentEditors,
+ TypInfo;
+
+procedure Register;
+
+implementation
+
+{$IFNDEF THANY_COMPILER_7_UP}
+
+procedure UnlistPublishedProperty(ComponentClass: TClass; const PropertyName: string);
+var
+ LPropInfo: PPropInfo;
+begin
+LPropInfo := GetPropInfo(ComponentClass, PropertyName);
+if LPropInfo <> nil
+then RegisterPropertyEditor(LPropInfo^.PropType^, ComponentClass, PropertyName, nil);
+end;
+
+{$ENDIF}
+
+procedure Register;
+begin
+//Register all components
+RegisterComponents('Png', [TPngSpeedButton, TPngBitBtn, TPngImageList, TPngImageCollection, TPngCheckListBox]);
+
+//Register component editors
+RegisterComponentEditor(TPngImageList, TPngImageListEditor);
+RegisterComponentEditor(TPngImageCollection, TPngImageCollectionEditor);
+RegisterComponentEditor(TPngBitBtn, TPngButtonEditor);
+RegisterComponentEditor(TPngSpeedButton, TPngButtonEditor);
+
+//Register property editors
+RegisterPropertyEditor(TypeInfo(TPngImageCollectionItems), TPngImageList, 'PngImages', TPngImageListImagesEditor);
+RegisterPropertyEditor(TypeInfo(TPngImageCollectionItems), TPngImageCollection, 'Items', TPngImageCollectionItemsEditor);
+
+//Hide properties that should be omitted
+UnlistPublishedProperty(TPngSpeedButton, 'NumGlyphs');
+UnlistPublishedProperty(TPngSpeedButton, 'Glyph');
+UnlistPublishedProperty(TPngBitBtn, 'NumGlyphs');
+UnlistPublishedProperty(TPngBitBtn, 'Glyph');
+end;
+
+end.
diff --git a/internal/1.0 RC3/1/Design/PngImageListEditor.ddp b/internal/1.0 RC3/1/Design/PngImageListEditor.ddp
new file mode 100644
index 0000000..4370276
Binary files /dev/null and b/internal/1.0 RC3/1/Design/PngImageListEditor.ddp differ
diff --git a/internal/1.0 RC3/1/Design/PngImageListEditor.dfm b/internal/1.0 RC3/1/Design/PngImageListEditor.dfm
new file mode 100644
index 0000000..89fe76d
--- /dev/null
+++ b/internal/1.0 RC3/1/Design/PngImageListEditor.dfm
@@ -0,0 +1,563 @@
+object PngImageListEditorDlg: TPngImageListEditorDlg
+ Left = 202
+ Top = 128
+ Width = 488
+ Height = 349
+ BorderIcons = [biSystemMenu]
+ Caption = 'Editing PngImageList'
+ Color = clBtnFace
+ Font.Charset = ANSI_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = FormClose
+ OnCreate = FormCreate
+ OnResize = FormResize
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object pnlMain: TPanel
+ Left = 0
+ Top = 0
+ Width = 461
+ Height = 249
+ BevelOuter = bvNone
+ TabOrder = 0
+ DesignSize = (
+ 461
+ 249)
+ object gbxProperties: TGroupBox
+ Left = 8
+ Top = 4
+ Width = 177
+ Height = 128
+ Anchors = [akLeft, akTop, akBottom]
+ Caption = 'Image properties'
+ TabOrder = 0
+ object lblName: TLabel
+ Left = 10
+ Top = 20
+ Width = 31
+ Height = 13
+ Caption = '&Name:'
+ FocusControl = edtName
+ end
+ object lblBackgroundColor: TLabel
+ Left = 10
+ Top = 64
+ Width = 86
+ Height = 13
+ Caption = '&Background color:'
+ FocusControl = cmbBackgroundColor
+ end
+ object edtName: TEdit
+ Left = 8
+ Top = 35
+ Width = 161
+ Height = 21
+ TabOrder = 0
+ OnChange = edtNameChange
+ end
+ object cmbBackgroundColor: TComboBox
+ Left = 29
+ Top = 79
+ Width = 140
+ Height = 21
+ ItemHeight = 13
+ TabOrder = 2
+ OnChange = cmbBackgroundColorChange
+ OnDblClick = cmbBackgroundColorDblClick
+ OnExit = cmbBackgroundColorExit
+ end
+ object pnlBackgroundColor: TPanel
+ Left = 8
+ Top = 79
+ Width = 20
+ Height = 21
+ BevelOuter = bvNone
+ BorderStyle = bsSingle
+ TabOrder = 1
+ OnClick = cmbBackgroundColorDblClick
+ end
+ end
+ object lbxImages: TListBox
+ Left = 276
+ Top = 8
+ Width = 177
+ Height = 209
+ Style = lbOwnerDrawVariable
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DragCursor = crDefault
+ DragMode = dmAutomatic
+ ItemHeight = 16
+ MultiSelect = True
+ TabOrder = 3
+ OnClick = lbxImagesClick
+ OnDblClick = lbxImagesDblClick
+ OnDragOver = lbxImagesDragOver
+ OnDrawItem = lbxImagesDrawItem
+ OnEnter = lbxImagesEnter
+ OnExit = lbxImagesExit
+ OnKeyDown = lbxImagesKeyDown
+ OnMeasureItem = lbxImagesMeasureItem
+ OnMouseUp = lbxImagesMouseUp
+ OnStartDrag = lbxImagesStartDrag
+ end
+ object cmbPreviewBackground: TComboBox
+ Left = 276
+ Top = 220
+ Width = 177
+ Height = 21
+ Style = csOwnerDrawFixed
+ Anchors = [akLeft, akRight, akBottom]
+ ItemHeight = 15
+ TabOrder = 4
+ OnChange = cmbPreviewBackgroundChange
+ OnDrawItem = cmbPreviewBackgroundDrawItem
+ Items.Strings = (
+ 'Default background'
+ 'Checkerboard background'
+ 'Diamonds background'
+ 'Slashed background'
+ 'Backslashed background')
+ end
+ object gbxImageInfo: TGroupBox
+ Left = 8
+ Top = 136
+ Width = 177
+ Height = 105
+ Anchors = [akLeft, akBottom]
+ Caption = 'Image information'
+ TabOrder = 1
+ object lblDimensions: TLabel
+ Left = 8
+ Top = 20
+ Width = 70
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Dimensions:'
+ end
+ object lblColorDepth: TLabel
+ Left = 8
+ Top = 36
+ Width = 70
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Color depth:'
+ end
+ object lblTransparency: TLabel
+ Left = 8
+ Top = 52
+ Width = 70
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Transparency:'
+ end
+ object lblCompression: TLabel
+ Left = 8
+ Top = 68
+ Width = 70
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Compression:'
+ end
+ object lblFiltering: TLabel
+ Left = 8
+ Top = 84
+ Width = 70
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Filtering:'
+ end
+ object lblDimensionsValue: TLabel
+ Left = 82
+ Top = 20
+ Width = 87
+ Height = 13
+ AutoSize = False
+ ShowAccelChar = False
+ end
+ object lblColorDepthValue: TLabel
+ Left = 82
+ Top = 36
+ Width = 87
+ Height = 13
+ AutoSize = False
+ ShowAccelChar = False
+ end
+ object lblTransparencyValue: TLabel
+ Left = 82
+ Top = 52
+ Width = 87
+ Height = 13
+ AutoSize = False
+ ShowAccelChar = False
+ end
+ object lblCompressionValue: TLabel
+ Left = 82
+ Top = 68
+ Width = 87
+ Height = 13
+ AutoSize = False
+ ShowAccelChar = False
+ end
+ object lblFilteringValue: TLabel
+ Left = 82
+ Top = 84
+ Width = 87
+ Height = 13
+ AutoSize = False
+ ShowAccelChar = False
+ end
+ end
+ object pnlActionButtons: TPanel
+ Left = 193
+ Top = 35
+ Width = 75
+ Height = 178
+ Anchors = [akLeft]
+ BevelOuter = bvNone
+ TabOrder = 2
+ object btnAdd: TPngBitBtn
+ Left = 0
+ Top = 0
+ Width = 75
+ Height = 25
+ Caption = '&Add'
+ TabOrder = 0
+ OnClick = btnAddClick
+ Layout = blGlyphRight
+ Margin = 6
+ Spacing = 3
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C000002804944415478DA8D925D48145114C7FF33AEBB7725BF52
+ 23B31E8D908C08EB210885A8C0879630B132320A3114C2972232049F22E893BE
+ E82125A32CF13362C3079505832CB34811524837025B4557F7EBEEECDC3BB7AB
+ A3D52846070E773867FEBF39FF734711426021B2CFF454C6547BADA638D29599
+ A92FB648A88E33FE8A85A382852958240A1692A77CD6231A04BFBEA85396015B
+ 4E7BC239FB7625541424A2FECD24FA5EBF178E90FFAAE046CD7F01369579A8EB
+ 643E797800189E05EADC4174B5F4439D186B8CE3BC5AA79AFFDF8013DD34FFD8
+ 7E72710F1033005D01DA87389E37F421F8F1934765AC5C4E31B62660637117CD
+ 2B3944CA738108930D0970DA81FE1F024F1B07E0EBEA1DB569E152A6F1015DDA
+ 5905D8E072D36D2585E4683610D56136653A1DC04408686B1BC14453874F9DF3
+ 5719DC6835F80D2B20A3B0936E2E7691822C6981C3128E7820205FEBE9F662BC
+ FE8586E9C90B42DCBE6B01A41D6CA5C9454564472AC00C53C88539459C0AD864
+ EA36E0C3A00F53B71E4445A8CE6901AC2F7849D523252493008659324FC504E9
+ 6C6114C03FEEC3FC3D0908AE00A4EC7D4623AE5222F558D263A1A51B660AB950
+ 7CFD06743469989D9216EE582D24ED7E428387CB088C65F552CAD115B90331F8
+ 197037FB40035580BD55889BD62526ED7C4C95E36709D89FE529EAA211447A7A
+ A1F7BA47C163A540FC8039DD0A404AEE239A71AE8208DDF4ADCAAF72CA30DDD2
+ 8EE0BBB71E592C973986DFF656005273EED3ED97AB088BCA8D4BBF81F19FF036
+ 77627E64A85156AA25D2FFF7D5AE02ACCBBA16CE3B7F2A216D6B26BC9E610C37
+ 3447B5C08CFC5BEC57CCCBB4C62A80CD79A9D2999C589B909E9A3EE7FD3E140B
+ 856BA45F37D68865C02F696882F0CDD367480000000049454E44AE426082}
+ PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
+ end
+ object btnDelete: TPngBitBtn
+ Left = 0
+ Top = 29
+ Width = 75
+ Height = 25
+ Caption = '&Delete'
+ TabOrder = 1
+ OnClick = btnDeleteClick
+ Layout = blGlyphRight
+ Margin = 6
+ Spacing = 3
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C0000026B4944415478DA8D935948545118C7FF779B7BE7CEA233
+ A913068D46E38339916225B43866B48C94630E961562D1438821E44B3D0D483E
+ 842F06D9824259894942168542055AD04B0D0519D1F2580E895B33317366BBB7
+ 338E4533B9F487EF5CEE39DFF73BDFF91F0EA3AA2A1262D85608B2085EA75D08
+ 09BCAC05A793184EE00EC664BD0759391BC578784AA346DA3EDFA8BC325FB712
+ 003CDB1ED69BCEEF38B08539B93F17D7470378FFDC1BFCDAEBD02D0F904593C2
+ 729D6ABEAD618FBB0C9E2A03369881A627C0D0AD51E2BBEDD02E0D90259BC2F3
+ DD86D292F2A38DDBE1B27310689AC0021DAF80B1FEA7C4D7BF7B3180044EE44A
+ E3A2AECFB2B7A2E058C3666C5DC32018051269320FF4BC03BC0323E4FBE0BE54
+ 004B012CC7D42A99E62E6BBDCB525D5308AB1E08856931929204E0FE17E0D3C0
+ 6332F9B02AAD03A6E50CB2733BF21A0F8B3B2BF360A473E11852A4E1801713C0
+ B77B43646AD89506D07B42592D4D5271B1057C04882D6CCBFC19929F37D34064
+ 6890CC3E73A7010C9E5046739394B3DE827868219B2EC569286AF2D74FC173B4
+ 2BD3F05D32337664912398733AF843F5225BB88EF64FEBE3C94E54E5AF735023
+ 331EDD21732F8FA703CED231520BADB10BCE3A0B4A3601D47D28A93E80FA6078
+ 7093F8BD8D8B01128A9682D3F40915CE02795745E27EFEE940E9EF2181B7A796
+ 0224A4DA68741BCAB69567BB6BC0697928D1A4270CBDCAC9ABD7C88FF1D3CB01
+ 12524CD481CE8C427B83B5AE1AC6FCD58851137909186FBF4C663F34AF044072
+ 4B442E88C655AD4527EA24ABA308D31F7D787DA937F873E29CEE3F00BF15756A
+ F4BAF64CEB5A7B7072662AE40FB4C5C8C5F9E7FC0BBF2FFCE106AF47A6000000
+ 0049454E44AE426082}
+ PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
+ end
+ object btnReplace: TPngBitBtn
+ Left = 0
+ Top = 58
+ Width = 75
+ Height = 25
+ Caption = '&Replace'
+ TabOrder = 2
+ OnClick = btnReplaceClick
+ Layout = blGlyphRight
+ Margin = 6
+ Spacing = 3
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C000003464944415478DA5D525B4C5457145DE70EC3D0995B2582
+ 8A112316FBD12698C6F8200A3206A90A43438C3AB5C6D6261325FAD3F4A3F607
+ DBFEF92121468D1AA2898FD8001518CC84A94AC6AA959AB64322FED854014306
+ 9D1106B833F7FD70DF3B62D49DEC7372CED96BEDB5F73EAC7CFFC05185E5B768
+ 8A9A2E10670EE8B2D6AB4B0AC8161A8CEBD05CDE6A6B3A3DEC1233BB74597DA2
+ 8B0A0C4986264AB074136C6968305BD3B0D6CB341591CEC1143FF33CA82946CC
+ 54D490AF6255FB3707D7221A7E8CA15FA3718FAE345282C43B04A5CDFF668E7D
+ BFDAB7BD0CD877258B3B5DB713FC6CD22F8B6ADDA70D9B4E477FF9040F93C0FE
+ 9FE378168EC65C9619342425F5866049E8817028B48E0F7E0C8C668196EE690C
+ 77FF1ECF9F4A8EAFDCEEFFA2F5BB0A147B80072F8023C7E34847FA7B3851DCAB
+ C98AE410947C3B28ECF9BA92DFB20CD04C2029036DE1098C748451B6B9123F1D
+ FE0C8487270F187C0E9C68BB874C24729EA96AB3695A3A5BB4EFAEB06D4F15BF
+ 613120E980DB0508B45FBE3E0AFEC302046B4BE0B2008BBC8048FE22259DADFD
+ 9007A2672C703FB0E2AFFE10D6EDD8C4571402AA418194CDCD0122030C3A7B69
+ 37E992D973A1C5E306224F4D0C9FEE02E27FB6B1A2604C280FF8F98FBCB912E6
+ 8C63B9DD06CF997DA5D3F93E3535F992649E3B9161453B6F09F3EA6AF945C44C
+ 3D7100D66B02DB5FF33825D80AC7668119C242A5E52C112C68BA2168D5757CBE
+ 95BB538C1C497E01B94DA0E752DBEA32F6FF7239BA806B9DC0D0FD565618880A
+ D3EBB7F2D0904BCD7241ECFFFF607D40752D2975E2E76A60D448ABBF8F4672E3
+ 2475EB47B6A03E22E835F50E01B3C114608C8C41EBBA88BCAA5AB8366C84F3C6
+ E5C0E2CD01A837C3E7A9C066721A63FD75615E4380B7543A521FE4F11798ECB8
+ FAB7369118290C34ED9E5FB3D1A99F235553B7EE61B2B7A787BEE05E922939A2
+ 4A037D99E5C1461FA8F6EC441AA397AE26C4C4845F97D4CFCB76EF3855B2A5D2
+ 513616BE8DF1EEDF62243B48B0D49BC994545DCAAE39F8A557991131D4DE999A
+ 1D7B16E45C793179321D5AB1CDDFBEE670131EF7FD8347172EC74D038D943981
+ B78CCD2F6F3DEAE67D2DA6A4A4332FA70E701CD7ABCE6661AADAC23C8FBBC357
+ 5C549D4D4D0EEBAABC8BC04FF09EBD02E1D692A4E09B28E50000000049454E44
+ AE426082}
+ PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
+ end
+ object btnClear: TPngBitBtn
+ Left = 0
+ Top = 87
+ Width = 75
+ Height = 25
+ Caption = '&Clear'
+ TabOrder = 3
+ OnClick = btnClearClick
+ Layout = blGlyphRight
+ Margin = 6
+ Spacing = 3
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C000003094944415478DA6D935B48145118C7FFB373E6BA9BDBBA
+ ADB58BE1A5A8970CB4A28C8A966EA696DA45ED22452515296A12BD45E14B4545
+ 0F15223D1414B545216D8558A2A6899544D8432F964611994617775777DD9DE9
+ 9B59A5A80E733867BE6FFEBFF3FDBFE170400D38DE02A6CA608A0C5E95C06471
+ 96A6DA6E730E47068B8E76303D560270434C11C1CB426158B137088AE410F570
+ 1DF70F40163C1126F933B7ADCFCA299A8B2BF5CF11ECED2DE725F1B220F1DE80
+ 7D862FBF24DBA50912DAEFBF08FD05905C518EF7A514AEF35E39BE00F3938075
+ C7DEE0CD83F643B2223E0AD893DA56147B3DD7765AF17000387AF665F0374016
+ 155D55AF3BF2728B4E1DC9C2E2E9C07018A83DFF1A7D0FDBEE45125DC9199B73
+ B2EA364D45AA15F0F501971A9E05E2008E6310C57A6B7EEEDEEAC3CB914DE270
+ 94268013175EA1BFB51BE9A505A82970234906040BF0F80370E36AB701A8B601
+ B1D3CAAA9C83C5B5B95842E23112739489D1F4B57C4660640C651B52318501E3
+ 3140A1B56B1068BAD169002ACF2173694D464531F2D22D088FD3B1BAF9C042D9
+ 106D781E50691DD7084C7191DE5F7F079EDF794200F79911ECAFB2254D63584A
+ 4D635C5C3C390C8831B43F8286857721E0ADBF750270A0CA0691C14EA5A524C4
+ 4FE02684FA84D898DC049011E00B55FAB3B9C5B470862CD46273B19126E3804D
+ 8A9F625A216884B691D1B85822B868C40CD09366B3892AB93B89ECB595DCFA8D
+ D0A3F8EDC1807CFA086E2C047DF61C136EE68C5204606A7753FC375281C4D4EA
+ C535057BD535AB4C886E348C3E8A763D45B4E33184ADBBC1A7A75080727A1CC0
+ DA1F4C028C1153C0B1EBCEC2A2A2C4D5CBA0C5E27DF8D1DE896FFEC65BA2DB93
+ E62CDDB1484E9E0E8DFC7322E5EEFBFF04982D73911D5FF2A62DDE948295D0A8
+ 8AC1962E0CF8EE56D03D69563DEEB6D45DDB3D56B783FE2DF0FEA63FF817C0AC
+ C463E1E19FB7A72C6BEEC685E8B9D888FEA6D67239D171598BC5BC0969337D99
+ FB4A5C925D454FFDCDD07F0026641613E5DB5697332338FCB5231A1E2FB1086C
+ 484CB05155D142DB34678385AE732410ACFB05147F0B83A25F23860000000049
+ 454E44AE426082}
+ PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
+ end
+ object btnUp: TPngBitBtn
+ Left = 0
+ Top = 124
+ Width = 75
+ Height = 25
+ Caption = '&Up'
+ TabOrder = 4
+ OnClick = btnUpClick
+ Layout = blGlyphRight
+ Margin = 6
+ Spacing = 3
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C0000021C4944415478DAA5933B68535118C7FFE7DE247D886821
+ 26197C504C8A5894D2461087BA38A874503B89521F9B858E0AA28BA08B1D1C14
+ 412D48EB031D62972E6D8DD84987802D8A1645712AA6A995368F7BCFDB737223
+ B44171C8E17CE783EF5E7EE7FBFEF77F89D61A8D2CD23020753E0B68BBAB07A0
+ ECA121851CF211B9A928835B2A5E9294DE16C50A44C983CDAC5481E6F2EF0025
+ 44BF1F6A79D27B38DD04A530FD7C863A3F0BA714E599FF038448AF8AD0C48143
+ DDF13B27DB400870617411D9B1A97CB357EC931ECBF17F0374CAA37A626BF79E
+ 8ECB2712D81209E65C12C0B587DF309F99FC1C617E1FAFD02FAC585E03B04BA9
+ 362ED4787847EAE0E923ED486E02CA3C78B4C180BE9680FB0F7258CEBE9E218C
+ 1F371DFC5AD781E4629447B70DECEFDD85DD51029F013CD01361076869023E2D
+ 294C8E4CC37BFB664C7371467155034871BDD81ABB92E8DA8B8EA8032103396C
+ 4805840C4098CC4C616E41A0F0E8199C8FB337941BBE4A5267A78E5244322BED
+ FB9AE3B156386B6CA1AB46017C334AA16C46A2A61036B5FC22F0F49EAF970BFD
+ 64E7B957EF56E29D5D7C730C9A0437592BB824080BA4352D1C52231B887AFF01
+ FE8BC7B324399813A1CE1E574BABA301A00E60BB2075F63345C708FB7DF8AE24
+ C981973F123DE9F8C698915DD9B7AB1BEB0C5E07704266A4F905CCDD1AC993ED
+ C7C6075DD71DB697492ACDB765904C40D9E036F35AFCA905F3B0B2A7E86AE962
+ E33F53A380DF494945E019F9A78D0000000049454E44AE426082}
+ PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
+ end
+ object btnDown: TPngBitBtn
+ Left = 0
+ Top = 153
+ Width = 75
+ Height = 25
+ Caption = '&Down'
+ TabOrder = 5
+ OnClick = btnDownClick
+ Layout = blGlyphRight
+ Margin = 6
+ Spacing = 3
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C000002174944415478DAB5934F68134114C6BFCD6E936AFF482B
+ 521A3555AC52D4D21EF620586C4104FF1D2C257810ADA5148AC5A35E144F7A50
+ 111141105A44AD07853482C593158A2749A1912A88550F82D5DA966CB2D96E76
+ 6667C7994D0824F1161C18DEEEDB79BFF7E6FB5885738E6A965235A07D68E682
+ E3A9B719E3014E5D7894C22322120A26222F4617CCFF4EFCC8D2A607C3B8A444
+ 86DFFD8EE85D2DBBDA1AE079E5F8B257259FD3346021F1137337279695D69184
+ 3B7A5E574FB50386535153B254592CF6C620F0F207702DFA8029E1E8EBF9B0DE
+ DD1DED6B459D0A30AFB25042B500F0C70252A249631D30F5E2233E3D9C4C2A6D
+ FD53C7B3448D6D3BDC5B7B68FF26410078D9D812FA6105F8BC0AE404A866750D
+ C6DD7B39ACA70694ADC79E83DBCE75AB297C65FB913EEC6856C10A105EE8BE68
+ 00DF5205A2EB02938F80AFC91B40E8AA123E2A000E0535ADC774E7DE73F53D07
+ 119417155DA5C32601D67252004914C9780C48CC3E11730C4A7C1E202CA2996C
+ 13B349DCEE3CD0EB76E9E06EFEBCEF8C1C430887B733C09B57B3E2A91F08F833
+ 1501C4B4C032D66E97B269D673628FB6AF03ACE04A6003E0BC4F82C49F7E1182
+ 9C14D9C5A2462500D3064D9B3AD782D35BA2A75BEA3B223E21B3F01D4B13E3CB
+ CC324571CD5C89431580EC3A889119A86DDEFCAC73EC6C480A317F67DCB1577E
+ 9D11F7885558FC2F80BF4DEB62A8B1E1163C8E5CDAB82C54BCFF7F7EA66A017F
+ 01C92B1C3633E7F2D20000000049454E44AE426082}
+ PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
+ end
+ end
+ end
+ object pnlButtons: TPanel
+ Left = 0
+ Top = 249
+ Width = 461
+ Height = 37
+ BevelOuter = bvNone
+ TabOrder = 1
+ DesignSize = (
+ 461
+ 37)
+ object pnlModalButtons: TPanel
+ Left = 152
+ Top = 4
+ Width = 158
+ Height = 25
+ Anchors = [akBottom]
+ BevelOuter = bvNone
+ TabOrder = 0
+ object btnOK: TPngBitBtn
+ Left = 0
+ Top = 0
+ Width = 75
+ Height = 25
+ Caption = '&OK'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C000001D44944415478DAC5934148146118869F7F669ADD550221
+ 5C5110090FDB25820E2B052D754848F010648487D214098930A443E521F02228
+ E52D4AA873744828DA20483A48D6C15B5D4294D2924A6D0F5B63EB36BEF3AF44
+ 222D8287061E66BEE17B9F9DEF9B1D1386213B39CC8E05DCA49E353E9257F543
+ FC146BC213BED8F5D7B5B751FB34FA31BA5C97FD8661A629709D55B26505D1D9
+ A58E18E771E85115188F36E30C39AF5DDF6D2C7C2BB44934B145109D43F65049
+ 77554355673C164F2DCE2C4E4A72C654326FCC35D39FCC24477273B9F9E06D70
+ 5AEDAF242A050D35929CF4EABD3EF5A4BC658F85C9856CB150ECA6824FA6226A
+ E925E337FBCF9D238E1FDC096699E394A2EF44070D7498C3A629914E60A60CF9
+ A7F9871AA38738DF05254117493566B9CC41BE28768F198DB14486348754578B
+ 47E209A3FAD51BEC266747FB23E85451E43617B9404AD71F84236A4534CA036D
+ E40DB7B4BCABDA435112360BDAA37D6AB327B8CB513D60B8D1B0221E8B69AE28
+ 38226C68ABA0D53EC13EF6F292731A277A5DCB625CDAF75C5270CC8612FF12B4
+ 584174E3859EE318BFECBC2B1AA55FCDF76D205E4E705CC56FFB4719E000837C
+ E6ABC267F51A9F6D0A9615948EB41893AC4F4B9CB07762DB10FCF7AF711D7610
+ 84C5CCB842D50000000049454E44AE426082}
+ end
+ object btnCancel: TPngBitBtn
+ Left = 83
+ Top = 0
+ Width = 75
+ Height = 25
+ Cancel = True
+ Caption = '&Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000001974455874536F6674776172650041646F626520496D616765526561
+ 647971C9653C000002E24944415478DA6D93CB4F135114C6BF79B5451E022D42
+ B0C5C82321206A58812B4AD8B8D2981077B22BB4087F4C1BCA232E64E38618FF
+ 00096C30411E0B44A031214140A10FFAA02D7DCCDCB99E3B8A4074929399CC9D
+ EF37F77EDF39D2D1230012C00DDCA1EA3638964B65A05C02741D600C372EC380
+ 9773EC98266206AD49478F495C42BDEA541750533198DFCB064837FD3F0089FD
+ 352E255CCA9A4BD92C1FE640523A7C8066B5D6365FF7EAC590E66EC149F88D99
+ DE4C4E3219537AF90A40B07197C7166CEFF7C8D9E30CBE7D4E2CE62E30221D76
+ 6240BB5FB5DCF03A00D9D104F3C7571CBF7D6F24B7321304991100128FB9DCF6
+ 506BBF5BD5B802964C636B258E54867BA5C387908A598CDDEA72061B5F3E5315
+ 471DD8E93E0EDE7DC45924EFD309E074DBE63AFA3D50B80C3D914164FDCC8825
+ D8A4AC604600502A02C5738C5777DD0EDD7DEE9514AD0A2C7A80FD0F9BE0BA89
+ D63E37344B9C16621E4D98130A1D51986F01CA04289169A53CFCD5ED95E196A7
+ BDD0640758220A295F806CC012EF6D9C211637038A8269CB180BD0F33B3201B0
+ EE45F86AEF55CCB60D744021217279B0740EBB6B0944636C94C4737F63118055
+ 273DF0ABA8C8309FCB639F6D7FD20245A7855C810017D8FD92C6CF241F953801
+ E8B5F94723ADD6DF10FBC9B0701B1926CECCCE32405E87526428A78AD8FD5EC6
+ 4901018563FA1F80C8D9E9B185DAFA3C92884A4FA410D94852F798E86CD0A015
+ 4CE8E706B6D3E0511313B493A94B80441D36E674DB83E4B67AE9F6DEBA65984F
+ F451A30373DD0E40CBD28FA8B9B6097B0A4CCAA018576A3040EDB9DCE5BD0799
+ ABD0E356544634CE26C8B019EA799419C61A65847A18544DEC966A832A057805
+ A0D96697E7DB7BEB872A1D32226B09331A3727AD9CE9120046454336DEC411A4
+ D064DA08B680454A7F44FA546B45586FB761C1AE4A83C90C0F9078FAD2D84B00
+ 4D201887BF0E089370290F0CAB6298048051DE659DC699A15B96B17C7D7CAF03
+ 44D1A75E05D8A1168889F55F525F839E0094AAF50000000049454E44AE426082}
+ end
+ end
+ end
+ object dlgOpenPicture: TOpenPictureDialog
+ DefaultExt = 'png'
+ Filter = 'Portable Network Graphics (*.png)|*.png'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
+ Title = 'Browse for a PNG file'
+ Left = 40
+ Top = 251
+ end
+ object dlgColor: TColorDialog
+ Options = [cdAnyColor]
+ Left = 72
+ Top = 251
+ end
+ object Images: TPngImageCollection
+ Items = <>
+ Left = 8
+ Top = 251
+ end
+end
diff --git a/internal/1.0 RC3/1/Design/PngImageListEditor.pas b/internal/1.0 RC3/1/Design/PngImageListEditor.pas
new file mode 100644
index 0000000..360a326
--- /dev/null
+++ b/internal/1.0 RC3/1/Design/PngImageListEditor.pas
@@ -0,0 +1,1166 @@
+unit PngImageListEditor;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, {$IFDEF THANY_COMPILER_6_UP}Variants,{$ENDIF}
+ Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, PngBitBtn,
+ ExtCtrls, PngImageList, ExtDlgs, pngimage;
+
+type
+ TPngImageListEditorDlg = class(TForm)
+ cmbBackgroundColor: TComboBox;
+ cmbPreviewBackground: TComboBox;
+ dlgColor: TColorDialog;
+ dlgOpenPicture: TOpenPictureDialog;
+ edtName: TEdit;
+ gbxImageInfo: TGroupBox;
+ gbxProperties: TGroupBox;
+ lblBackgroundColor: TLabel;
+ lblColorDepth: TLabel;
+ lblColorDepthValue: TLabel;
+ lblCompression: TLabel;
+ lblCompressionValue: TLabel;
+ lblDimensions: TLabel;
+ lblDimensionsValue: TLabel;
+ lblFiltering: TLabel;
+ lblFilteringValue: TLabel;
+ lblName: TLabel;
+ lblTransparency: TLabel;
+ lblTransparencyValue: TLabel;
+ lbxImages: TListBox;
+ pnlActionButtons: TPanel;
+ pnlBackgroundColor: TPanel;
+ pnlMain: TPanel;
+ btnAdd: TPngBitBtn;
+ btnDelete: TPngBitBtn;
+ btnReplace: TPngBitBtn;
+ btnClear: TPngBitBtn;
+ btnUp: TPngBitBtn;
+ btnDown: TPngBitBtn;
+ Images: TPngImageCollection;
+ pnlButtons: TPanel;
+ pnlModalButtons: TPanel;
+ btnOK: TPngBitBtn;
+ btnCancel: TPngBitBtn;
+ procedure btnAddClick(Sender: TObject);
+ procedure btnClearClick(Sender: TObject);
+ procedure btnDeleteClick(Sender: TObject);
+ procedure btnDownClick(Sender: TObject);
+ procedure btnReplaceClick(Sender: TObject);
+ procedure btnUpClick(Sender: TObject);
+ procedure cmbBackgroundColorChange(Sender: TObject);
+ procedure cmbBackgroundColorDblClick(Sender: TObject);
+ procedure cmbBackgroundColorExit(Sender: TObject);
+ procedure cmbPreviewBackgroundChange(Sender: TObject);
+ procedure cmbPreviewBackgroundDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
+ procedure edtNameChange(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure FormCreate(Sender: TObject);
+ procedure FormResize(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure lbxImagesClick(Sender: TObject);
+ procedure lbxImagesDblClick(Sender: TObject);
+ procedure lbxImagesDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
+ procedure lbxImagesDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
+ procedure lbxImagesEnter(Sender: TObject);
+ procedure lbxImagesExit(Sender: TObject);
+ procedure lbxImagesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+ procedure lbxImagesMeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);
+ procedure lbxImagesMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+ procedure lbxImagesStartDrag(Sender: TObject; var DragObject: TDragObject);
+ private
+ DraggingIndex, MaxWidth: Integer;
+ SelectionBodyColor, SelectionBorderColor: TColor;
+ function ConformDimensions(Png: TPNGObject): Boolean;
+ function FirstSelected: Integer;
+ function LastSelected: Integer;
+ procedure DrawBackground(Canvas: TCanvas; const Rect: TRect; ScrollPos, Index: Integer; BlendColor: TColor = clNone; IgnoreScrollPos: Boolean = False);
+ procedure GetColorProc(const S: string);
+ procedure ParseBackgroundColor(Sender: TObject; CanDisplayError, CanChangeText: Boolean);
+ procedure SelectBackgroundColor(Sender: TObject; Color: TColor);
+ public
+ ImageWidth, ImageHeight: Integer;
+ end;
+
+var
+ PngImageListEditorDlg: TPngImageListEditorDlg;
+
+implementation
+
+uses Math;
+
+{$R *.dfm}
+
+//For calculating OfficeXP colors
+const
+ WeightR: single = 0.764706;
+ WeightG: single = 1.52941;
+ WeightB: single = 0.254902;
+
+const
+ SIncorrectSize = 'The selected PNG "%s" must be %dx%d in size, while its actual size is %dx%d';
+
+var
+ ResX, ResY: Integer;
+
+{ Globals }
+
+function Blend(C1, C2: TColor; W1: Integer): TColor;
+var
+ W2, A1, A2, D, F, G: Integer;
+begin
+if C1 < 0
+then C1 := GetSysColor(C1 and $FF);
+if C2 < 0
+then C2 := GetSysColor(C2 and $FF);
+
+if W1 >= 100
+then D := 1000
+else D := 100;
+
+W2 := D - W1;
+F := D div 2;
+
+A2 := C2 shr 16 * W2;
+A1 := C1 shr 16 * W1;
+G := (A1 + A2 + F) div D and $FF;
+Result := G shl 16;
+
+A2 := (C2 shr 8 and $FF) * W2;
+A1 := (C1 shr 8 and $FF) * W1;
+G := (A1 + A2 + F) div D and $FF;
+Result := Result or G shl 8;
+
+A2 := (C2 and $FF) * W2;
+A1 := (C1 and $FF) * W1;
+G := (A1 + A2 + F) div D and $FF;
+Result := Result or G;
+end;
+
+function ColorDistance(C1, C2: Integer): Single;
+var
+ DR, DG, DB: Integer;
+begin
+DR := (C1 and $FF) - (C2 and $FF);
+Result := Sqr(DR * WeightR);
+DG := (C1 shr 8 and $FF) - (C2 shr 8 and $FF);
+Result := Result + Sqr(DG * WeightG);
+DB := (C1 shr 16) - (C2 shr 16);
+Result := Result + Sqr(DB * WeightB);
+Result := Sqrt(Result);
+end;
+
+function GetAdjustedThreshold(BkgndIntensity, Threshold: Single): Single;
+begin
+if BkgndIntensity < 220
+then Result := (2 - BkgndIntensity / 220) * Threshold
+else Result := Threshold;
+end;
+
+function IsContrastEnough(AColor, ABkgndColor: Integer; DoAdjustThreshold: Boolean; Threshold: Single): Boolean;
+begin
+if DoAdjustThreshold
+then Threshold := GetAdjustedThreshold(ColorDistance(ABkgndColor, $000000), Threshold);
+Result := ColorDistance(ABkgndColor, AColor) > Threshold;
+end;
+
+procedure AdjustContrast(var AColor: Integer; ABkgndColor: Integer; Threshold: Single);
+var
+ X, Y, Z: Single;
+ R, G, B: Single;
+ RR, GG, BB: Integer;
+ I1, I2, S, Q, W: Single;
+ DoInvert: Boolean;
+begin
+I1 := ColorDistance(AColor, $000000);
+I2 := ColorDistance(ABkgndColor, $000000);
+Threshold := GetAdjustedThreshold(I2, Threshold);
+
+if I1 > I2
+then DoInvert := I2 < 442 - Threshold
+else DoInvert := I2 < Threshold;
+
+X := (ABkgndColor and $FF) * WeightR;
+Y := (ABkgndColor shr 8 and $FF) * WeightG;
+Z := (ABkgndColor shr 16) * WeightB;
+
+R := (AColor and $FF) * WeightR;
+G := (AColor shr 8 and $FF) * WeightG;
+B := (AColor shr 16) * WeightB;
+
+if DoInvert
+then begin
+ R := 195 - R;
+ G := 390 - G;
+ B := 65 - B;
+ X := 195 - X;
+ Y := 390 - Y;
+ Z := 65 - Z;
+ end;
+
+S := Sqrt(Sqr(B) + Sqr(G) + Sqr(R));
+if S < 0.01
+then S := 0.01;
+
+Q := (R * X + G * Y + B * Z) / S;
+
+X := Q / S * R - X;
+Y := Q / S * G - Y;
+Z := Q / S * B - Z;
+
+W := Sqrt(Sqr(Threshold) - Sqr(X) - Sqr(Y) - Sqr(Z));
+
+R := (Q - W) * R / S;
+G := (Q - W) * G / S;
+B := (Q - W) * B / S;
+
+if DoInvert
+then begin
+ R := 195 - R;
+ G := 390 - G;
+ B := 65 - B;
+end;
+
+if R < 0 then R := 0 else if R > 195 then R := 195;
+if G < 0 then G := 0 else if G > 390 then G := 390;
+if B < 0 then B := 0 else if B > 65 then B := 65;
+
+RR := Trunc(R * (1 / WeightR) + 0.5);
+GG := Trunc(G * (1 / WeightG) + 0.5);
+BB := Trunc(B * (1 / WeightB) + 0.5);
+
+if RR > $FF then RR := $FF else if RR < 0 then RR := 0;
+if GG > $FF then GG := $FF else if GG < 0 then GG := 0;
+if BB > $FF then BB := $FF else if BB < 0 then BB := 0;
+
+AColor := (BB and $FF) shl 16 or (GG and $FF) shl 8 or (RR and $FF);
+end;
+
+procedure SetContrast(var Color: TColor; BkgndColor: TColor; Threshold: Integer);
+var
+ T: Single;
+begin
+if Color < 0
+then Color := GetSysColor(Color and $FF);
+if BkgndColor < 0
+then BkgndColor := GetSysColor(BkgndColor and $FF);
+T := Threshold;
+if not IsContrastEnough(Color, BkgndColor, True, T)
+then AdjustContrast(Integer(Color), BkgndColor, T);
+end;
+
+function ResizeProportionalX(InitialValue: Integer): Integer;
+begin
+Result := InitialValue * ResX div 96;
+end;
+
+function ResizeProportionalY(InitialValue: Integer): Integer;
+begin
+Result := InitialValue * ResY div 96;
+end;
+
+procedure InitResolution;
+var
+ DC: HDC;
+begin
+DC := GetDC(0);
+ResX := GetDeviceCaps(DC, LOGPIXELSX);
+ResY := GetDeviceCaps(DC, LOGPIXELSY);
+ReleaseDC(0, DC);
+end;
+
+{ TPngImageListEditorDlg }
+
+function TPngImageListEditorDlg.ConformDimensions(Png: TPNGObject): Boolean;
+begin
+//Returns whether an image conforms the specified dimensions, if available
+Result := ((ImageHeight = 0) and (ImageWidth = 0)) or ((ImageHeight = Png.Height) and (ImageWidth = Png.Width));
+end;
+
+function TPngImageListEditorDlg.FirstSelected: Integer;
+begin
+//Return the first selected image
+Result := 0;
+while not lbxImages.Selected[Result] and (Result < lbxImages.Items.Count)
+do Inc(Result);
+end;
+
+function TPngImageListEditorDlg.LastSelected: Integer;
+begin
+//Return the last selected image
+Result := lbxImages.Items.Count - 1;
+while not lbxImages.Selected[Result] and (Result >= 0)
+do Dec(Result);
+end;
+
+procedure TPngImageListEditorDlg.DrawBackground(Canvas: TCanvas; const Rect: TRect; ScrollPos, Index: Integer; BlendColor: TColor = clNone; IgnoreScrollPos: Boolean = False);
+var
+ I, X, Y: Integer;
+ PatBitmap, BkBitmap: TBitmap;
+ Even: Boolean;
+begin
+//Draw the background of the listbox, if any
+if Index = 0
+then begin
+ //No background, then skip the hard part
+ if BlendColor = clNone
+ then Canvas.Brush.Color := clWindow
+ else Canvas.Brush.Color := BlendColor;
+ Canvas.FillRect(Rect);
+ Exit;
+ end;
+
+//Draw the background
+BkBitmap := TBitmap.Create;
+PatBitmap := TBitmap.Create;
+try
+ PatBitmap.Height := 16;
+ PatBitmap.Width := 16;
+ with PatBitmap.Canvas
+ do begin
+ //First, draw the background for the pattern bitmap
+ if BlendColor = clNone
+ then begin
+ Brush.Color := clWindow;
+ FillRect(Classes.Rect(0, 0, PatBitmap.Height, PatBitmap.Width));
+ Brush.Color := Blend(clWindow, clBtnFace, 50);
+ end
+ else begin
+ Brush.Color := Blend(clWindow, BlendColor, 50);
+ FillRect(Classes.Rect(0, 0, PatBitmap.Height, PatBitmap.Width));
+ Brush.Color := BlendColor;
+ end;
+
+ //Then, draw the foreground on the pattern bitmap
+ Pen.Color := Brush.Color;
+ case Index of
+ 1: begin
+ //Checkerboard background
+ FillRect(Classes.Rect(PatBitmap.Width div 2, 0, PatBitmap.Width, PatBitmap.Height div 2));
+ FillRect(Classes.Rect(0, PatBitmap.Height div 2, PatBitmap.Width div 2, PatBitmap.Height));
+ end;
+ 2: begin
+ //Diamonds background
+ PatBitmap.Width := 10;
+ PatBitmap.Height := 10;
+ Polygon([Point(PatBitmap.Width div 2, 0), Point(PatBitmap.Width, PatBitmap.Height div 2), Point(PatBitmap.Width div 2, PatBitmap.Height), Point(0, PatBitmap.Height div 2)]);
+ end;
+ 3: begin
+ //Slashed background
+ Even := True;
+ I := 2;
+ while I < PatBitmap.Width + PatBitmap.Height
+ do begin
+ if I < PatBitmap.Width
+ then begin
+ MoveTo(I, 0);
+ LineTo(-1, I + 1);
+ end
+ else begin
+ MoveTo(PatBitmap.Width, I - PatBitmap.Width);
+ LineTo(I - PatBitmap.Width, PatBitmap.Height);
+ end;
+ if Even
+ then Inc(I, 1)
+ else Inc(I, 3);
+ Even := not Even;
+ end;
+ end;
+ 4: begin
+ //Backslashed background
+ Even := True;
+ I := 2;
+ while I < PatBitmap.Width + PatBitmap.Height
+ do begin
+ if I < PatBitmap.Width
+ then begin
+ MoveTo(I, 0);
+ LineTo(PatBitmap.Width, PatBitmap.Height - I);
+ end
+ else begin
+ MoveTo(0, I - PatBitmap.Width - 1);
+ LineTo(PatBitmap.Width - (I - PatBitmap.Width) + 1, PatBitmap.Height);
+ end;
+ if Even
+ then Inc(I, 1)
+ else Inc(I, 3);
+ Even := not Even;
+ end;
+ end;
+ end;
+ end;
+
+ //The actual background bitmap, its width and height are increased to compensate
+ //for scrolling distance
+ BkBitmap.Width := Rect.Left mod PatBitmap.Width + Rect.Right - Rect.Left;
+ if IgnoreScrollPos
+ then ScrollPos := 0
+ else ScrollPos := (Rect.Top + ScrollPos) mod PatBitmap.Height;
+ BkBitmap.Height := ScrollPos + Rect.Bottom - Rect.Top;
+
+ //Now repeat the pattern bitmap onto the background bitmap
+ with BkBitmap.Canvas
+ do begin
+ Y := 0;
+ while Y < BkBitmap.Height
+ do begin
+ X := 0;
+ while X < BkBitmap.Width
+ do begin
+ Draw(X, Y, PatBitmap);
+ Inc(X, PatBitmap.Width);
+ end;
+ Inc(Y, PatBitmap.Height);
+ end;
+ end;
+
+ //And finally, draw the background bitmap to the canvas
+ BitBlt(Canvas.Handle, Rect.Left, Rect.Top, Rect.Right - Rect.Left, Rect.Bottom - Rect.Top, BkBitmap.Canvas.Handle, Rect.Left mod PatBitmap.Width, ScrollPos, SRCCOPY);
+finally
+ BkBitmap.Free;
+ PatBitmap.Free;
+ end;
+end;
+
+//Method for getting color values
+procedure TPngImageListEditorDlg.GetColorProc(const S: string);
+begin
+cmbBackgroundColor.Items.Add(S);
+end;
+
+//Parse a background color name or code
+procedure TPngImageListEditorDlg.ParseBackgroundColor(Sender: TObject; CanDisplayError, CanChangeText: Boolean);
+var
+ S: string;
+ I, ParsedColor: Integer;
+begin
+with cmbBackgroundColor
+do begin
+ //First, see if its a known color name
+ if IdentToColor(Text, ParsedColor)
+ then begin
+ ItemIndex := Items.IndexOf(Text);
+ pnlBackgroundColor.Color := ParsedColor;
+ end
+ else begin
+ S := Text;
+ //Replace # with $ so StringToColor recognizes it
+ if (Length(S) > 0) and (S[1] = '#')
+ then S[1] := '$';
+ try
+ //Try to convert to a real color value
+ ParsedColor := StringToColor(S);
+ if CanChangeText
+ then begin
+ //And try to convert back to an identifier (i.e. if you type in $000000, it'll become clBlack)
+ if ColorToIdent(ParsedColor, S)
+ then ItemIndex := Items.IndexOf(S)
+ else Text := S;
+ end;
+ pnlBackgroundColor.Color := ParsedColor;
+ except
+ //If it fails, display a message if neccesary
+ on EConvertError do
+ if CanDisplayError
+ then begin
+ MessageBox(Self.Handle, PChar(Format('"%s" is not a valid color value', [Text])), PChar(Self.Caption), MB_ICONERROR or MB_OK);
+ SetFocus;
+ end;
+ end;
+ end;
+ end;
+//And finally, set the background color to every selected image
+if (Sender <> lbxImages)
+then for I := 0 to lbxImages.Items.Count - 1
+ do if lbxImages.Selected[I]
+ then Images.Items[I].Background := pnlBackgroundColor.Color;
+end;
+
+
+procedure TPngImageListEditorDlg.SelectBackgroundColor(Sender: TObject; Color: TColor);
+var
+ S: string;
+begin
+//This happens after a background color has been slected from the color dialog
+//Try to convert a color into an identifier, or else into a hexadecimal representation
+if ColorToIdent(Color, S)
+then cmbBackgroundColor.ItemIndex := cmbBackgroundColor.Items.IndexOf(S)
+else cmbBackgroundColor.Text := '$' + IntToHex(dlgColor.Color, 6);
+ParseBackgroundColor(Sender, False, True);
+end;
+
+procedure TPngImageListEditorDlg.btnAddClick(Sender: TObject);
+var
+ Png: TPngImageCollectionItem;
+ I, Selected, FirstSelected: Integer;
+begin
+//The Add button is pressed, let the programmer look for an image
+dlgOpenPicture.Options := dlgOpenPicture.Options + [ofAllowMultiSelect];
+if dlgOpenPicture.Execute
+then begin
+ for I := 0 to lbxImages.Items.Count - 1
+ do lbxImages.Selected[I] := False;
+ FirstSelected := -1;
+ for I := 0 to dlgOpenPicture.Files.Count - 1
+ do begin
+ Png := Images.Items.Add;
+ with Png.PngImage
+ do begin
+ //Load the image, but remove any gamma, so that the gamma won't be reapplied
+ //when loading the image from the DFM
+ LoadFromFile(dlgOpenPicture.Files[I]);
+ if Png.PngImage.Header.ColorType in [COLOR_RGB, COLOR_RGBALPHA, COLOR_PALETTE]
+ then Chunks.RemoveChunk(Chunks.ItemFromClass(TChunkgAMA));
+ end;
+ //Does the image conform the specified dimensions, if any?
+ if ConformDimensions(Png.PngImage)
+ then begin
+ //Update maximum image width
+ if MaxWidth < Png.PngImage.Width
+ then MaxWidth := Png.PngImage.Width;
+
+ //Invent a name for the image, and initialize its background color
+ Png.Name := 'PngImage' + IntToStr(Images.Items.Count - 1);
+ Png.Background := clWindow;
+
+ //Finally, add it and select it
+ Selected := lbxImages.Items.AddObject(Png.Name, Png);
+ lbxImages.Selected[Selected] := True;
+ if FirstSelected = -1
+ then FirstSelected := Selected;
+ end
+ else begin
+ //The image does not conform the specified dimensions
+ MessageBox(Handle, PChar(Format(SIncorrectSize, [ExtractFilename(dlgOpenPicture.Files[I]), ImageWidth, ImageHeight, Png.PngImage.Width, Png.PngImage.Height])), PChar(Caption), MB_ICONERROR or MB_OK);
+ Images.Items.Delete(Png.Index);
+ end;
+ end;
+
+ //Focus the first selected (added) image
+ lbxImages.ItemIndex := FirstSelected;
+ lbxImages.SetFocus;
+ lbxImagesClick(nil);
+ end;
+end;
+
+procedure TPngImageListEditorDlg.btnClearClick(Sender: TObject);
+begin
+//Clear the listbox and the collection
+if (lbxImages.Items.Count > 0) and (MessageBox(Handle, 'This will clear the entire image list. Are you sure you want to do this?', PChar(Self.Caption), MB_ICONEXCLAMATION or MB_YESNO or MB_DEFBUTTON2) = IDYES)
+then begin
+ lbxImages.Items.Clear;
+ Images.Items.Clear;
+ lbxImagesClick(nil);
+ end;
+end;
+
+procedure TPngImageListEditorDlg.btnDeleteClick(Sender: TObject);
+
+ function GetCommaList: string;
+ var
+ I: Integer;
+ S: TStringList;
+ begin
+ //Get a comma list of the names of the selected images in the form "name1,
+ //name2 and name3"
+ Result := '';
+ S := TStringList.Create;
+ try
+ for I := 0 to lbxImages.Items.Count - 1
+ do if lbxImages.Selected[I]
+ then S.Add(Images.Items[I].Name);
+ for I := 0 to S.Count - 1
+ do begin
+ Result := Result + S[I];
+ if I < S.Count - 2
+ then Result := Result + ', '
+ else if I < S.Count - 1
+ then Result := Result + ' and ';
+ end;
+ finally
+ S.Free;
+ end;
+ end;
+
+var
+ I, NewIndex: Integer;
+begin
+with lbxImages
+do if (SelCount > 0) and (MessageBox(Handle, PChar(Format('Are you sure you want to delete %s?', [GetCommaList])), PChar(Self.Caption), MB_ICONEXCLAMATION or MB_YESNO) = IDYES)
+ then begin
+ //Delete every selected image from the listbox and from the collection
+ NewIndex := -1;
+ I := 0;
+ while I < Items.Count
+ do if Selected[I]
+ then begin
+ if NewIndex = -1
+ then NewIndex := I;
+ lbxImages.Items.Delete(I);
+ Images.Items.Delete(I);
+ end
+ else Inc(I);
+
+ //Figure out the new selection index
+ if NewIndex > Items.Count - 1
+ then NewIndex := Items.Count - 1
+ else if (NewIndex = -1) and (Items.Count > 0)
+ then NewIndex := 0;
+ Selected[NewIndex] := True;
+ ItemIndex := NewIndex;
+ lbxImagesClick(nil);
+ end;
+end;
+
+procedure TPngImageListEditorDlg.btnDownClick(Sender: TObject);
+var
+ I: Integer;
+begin
+//Move the selected items one position down
+with lbxImages
+do if (SelCount > 0) and (LastSelected < Items.Count - 1)
+ then for I := Items.Count - 1 downto 0
+ do if Selected[I]
+ then begin
+ Images.Items[I].Index := I + 1;
+ Items.Exchange(I, I + 1);
+ Selected[I + 1] := True;
+ end;
+lbxImagesClick(nil);
+end;
+
+procedure TPngImageListEditorDlg.btnReplaceClick(Sender: TObject);
+var
+ Item: TPngImageCollectionItem;
+ Index: Integer;
+ Png: TPNGObject;
+begin
+//The Replace button is pressed, let the programmer look for an image
+dlgOpenPicture.Options := dlgOpenPicture.Options - [ofAllowMultiSelect];
+with lbxImages
+do if (SelCount = 1) and dlgOpenPicture.Execute
+ then begin
+ Index := FirstSelected;
+ Png := TPNGObject.Create;
+ try
+ //First see if the image conforms the specified dimensions
+ Png.LoadFromFile(dlgOpenPicture.Filename);
+ if ConformDimensions(Png)
+ then begin
+ //Then remove any gamma, so that the gamma won't be reapplied when loading the
+ //image from the DFM
+ if Png.Header.ColorType in [COLOR_RGB, COLOR_RGBALPHA]
+ then Png.Chunks.RemoveChunk(Png.Chunks.ItemFromClass(TChunkgAMA));
+ Item := Images.Items[Index];
+ Item.PngImage := Png;
+
+ //Update the maximum image width
+ if MaxWidth < Item.PngImage.Width
+ then MaxWidth := Item.PngImage.Width;
+
+ //Repaint and update everything, to be sure
+ lbxImages.Repaint;
+ lbxImagesClick(nil);
+ end
+ else MessageBox(Handle, PChar(Format(SIncorrectSize, [ExtractFilename(dlgOpenPicture.Filename), ImageWidth, ImageHeight, Png.Width, Png.Height])), PChar(Caption), MB_ICONERROR or MB_OK);
+ finally
+ Png.Free;
+ end;
+ end;
+end;
+
+procedure TPngImageListEditorDlg.btnUpClick(Sender: TObject);
+var
+ I: Integer;
+begin
+//Move the selected items one position up
+with lbxImages
+do if (SelCount > 0) and (FirstSelected > 0)
+ then for I := 0 to Items.Count - 1
+ do if Selected[I]
+ then begin
+ Images.Items[I].Index := I - 1;
+ Items.Exchange(I, I - 1);
+ Selected[I - 1] := True;
+ end;
+lbxImagesClick(nil);
+end;
+
+procedure TPngImageListEditorDlg.cmbBackgroundColorChange(Sender: TObject);
+begin
+//While typing, try parsing the background color, but without any error messages
+ParseBackgroundColor(Sender, False, False);
+end;
+
+procedure TPngImageListEditorDlg.cmbBackgroundColorDblClick(Sender: TObject);
+begin
+//Just like in Delphi, when doubleclicking a color, the color dialog pops up
+dlgColor.Color := pnlBackgroundColor.Color;
+if dlgColor.Execute
+then SelectBackgroundColor(Sender, dlgColor.Color);
+end;
+
+procedure TPngImageListEditorDlg.cmbBackgroundColorExit(Sender: TObject);
+begin
+//When leaving the background combobox, parse the color, but this with error
+//message, if neccesary
+ParseBackgroundColor(Sender, True, True);
+end;
+
+procedure TPngImageListEditorDlg.cmbPreviewBackgroundChange(Sender: TObject);
+begin
+//Pewview background is changes, repaint all items
+lbxImages.Repaint;
+end;
+
+procedure TPngImageListEditorDlg.cmbPreviewBackgroundDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
+var
+ IconWidth: Integer;
+begin
+with cmbPreviewBackground
+do begin
+ //Draw the background "icon" of the preview background combobox
+ IconWidth := (Rect.Bottom - Rect.Top) * 4 div 3;
+ DrawBackground(Canvas, Classes.Rect(Rect.Left, Rect.Top, Rect.Left + IconWidth, Rect.Bottom), 0, Index, clNone, True);
+ Inc(Rect.Left, IconWidth);
+
+ //Background color of the rest of the item
+ if odSelected in State
+ then Canvas.Brush.Color := clHighlight
+ else Canvas.Brush.Color := clWindow;
+ Canvas.FillRect(Rect);
+ Inc(Rect.Left, 4);
+
+ //And the text
+ DrawText(Canvas.Handle, PChar(Items[Index]), -1, Rect, DT_LEFT or DT_NOPREFIX or DT_SINGLELINE or DT_VCENTER);
+
+ Canvas.Brush.Color := clWindow;
+ end;
+end;
+
+procedure TPngImageListEditorDlg.edtNameChange(Sender: TObject);
+begin
+//Update the selected image with the entered name, in realtime
+with lbxImages
+do if ItemIndex >= 0
+ then begin
+ Images.Items[ItemIndex].Name := edtName.Text;
+ Items[ItemIndex] := edtName.Text;
+ end;
+end;
+
+procedure TPngImageListEditorDlg.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+Action := caFree;
+end;
+
+procedure TPngImageListEditorDlg.FormCreate(Sender: TObject);
+var
+ Space8H: Integer;
+begin
+//Initialize OfficeXP colors for selection
+SelectionBodyColor := Blend(clHighlight, clWindow, 30);
+SetContrast(SelectionBodyColor, Blend(clWindow, clBtnFace, 165), 50);
+SelectionBorderColor := clHighlight;
+
+//Initialize a value that keeps track of dragging
+DraggingIndex := -1;
+
+//Get all available color names
+GetColorValues(GetColorProc);
+
+//Initialize the background to clWindow
+cmbBackgroundColor.ItemIndex := cmbBackgroundColor.Items.IndexOf('clWindow');
+cmbBackgroundColorChange(nil);
+
+//Do not specify image width and height by default (the imagelist will fill
+//these up, so that you cannot select an image other than these dimensions)
+ImageWidth := 0;
+ImageHeight := 0;
+
+//Resize everything to make it fit on "large fonts" setting. Note that these
+//operations are also needed on normal setting.
+Space8H := lbxImages.Top;
+Width := ResizeProportionalX(Width);
+Height := ResizeProportionalY(Height);
+Constraints.MinHeight := gbxProperties.Top + cmbBackgroundColor.Top + cmbBackgroundColor.Height + Space8H + Space8H + gbxImageInfo.Height + Space8H + (Height - pnlMain.Height);
+Constraints.MinWidth := Width;
+pnlButtons.Align := alBottom;
+pnlMain.Align := alClient;
+cmbPreviewBackground.ItemHeight := ResizeProportionalY(cmbPreviewBackground.ItemHeight);
+pnlBackgroundColor.Height := cmbBackgroundColor.Height;
+
+//Make sure the background color isn't reset when themes are enabled
+{$IFDEF ThemeSupport}
+pnlBackgroundColor.ParentBackground := True;
+pnlBackgroundColor.ParentBackground := False;
+{$ENDIF}
+end;
+
+procedure TPngImageListEditorDlg.FormResize(Sender: TObject);
+begin
+//There appears to be a bug that prevents a listbox from being redrawn correctly
+//when the form is resized
+lbxImages.Repaint;
+end;
+
+procedure TPngImageListEditorDlg.FormShow(Sender: TObject);
+var
+ I: Integer;
+begin
+//Initialize the maximum width of the images, to align text in the listbox
+MaxWidth := 0;
+for I := 0 to Images.Items.Count - 1
+do if Images.Items[I].PngImage.Width > MaxWidth
+ then MaxWidth := Images.Items[I].PngImage.Width;
+
+//Fill the listbox with the images
+for I := 0 to Images.Items.Count - 1
+do lbxImages.Items.AddObject(Images.Items[I].Name, Images.Items[I]);
+if lbxImages.Items.Count > 0
+then begin
+ lbxImages.Selected[0] := True;
+ lbxImages.ItemIndex := 0;
+ end;
+lbxImages.SetFocus;
+lbxImagesClick(nil);
+
+cmbPreviewBackground.ItemIndex := 0;
+FormResize(nil);
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesClick(Sender: TObject);
+
+ function GetDimensions(Png: TPNGObject): string;
+ begin
+ //Return the formatted dimensions of an image
+ Result := Format('%dx%d', [Png.Width, Png.Height]);
+ if Png.InterlaceMethod <> imNone
+ then Result := Result + ' interlace';
+ end;
+
+ function GetColorDepth(Png: TPNGObject): string;
+ begin
+ //Return the color depth, including whether the image is grayscale or paletted
+ case Png.Header.ColorType of
+ COLOR_GRAYSCALE, COLOR_GRAYSCALEALPHA:
+ Result := IntToStr(Png.Header.BitDepth) + '-bits grayscale';
+ COLOR_RGB, COLOR_RGBALPHA:
+ Result := IntToStr(Png.Header.BitDepth * 3) + '-bits';
+ COLOR_PALETTE:
+ Result := IntToStr(Png.Header.BitDepth) + '-bits paletted';
+ end;
+ end;
+
+ function GetTransparency(Png: TPNGObject): string;
+ begin
+ //Return the formatted transparency depth, or transparency mode
+ if Png.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA]
+ then Result := IntToStr(Png.Header.BitDepth) + '-bits alpha'
+ else case Png.TransparencyMode of
+ ptmBit: Result := 'bitmask';
+ ptmPartial: Result := 'indexed';
+ else Result := 'none';
+ end;
+ end;
+
+ function GetCompression(Png: TPNGObject): string;
+ begin
+ //Return the formatted compression level
+ Result := Format('level %d', [Png.CompressionLevel]);
+ end;
+
+ function GetFiltering(Png: TPNGObject): string;
+ begin
+ //Return the formatted filtering method
+ case Png.Header.FilterMethod of
+ FILTER_SUB: Result := 'sub';
+ FILTER_UP: Result := 'up';
+ FILTER_AVERAGE: Result := 'average';
+ FILTER_PAETH: Result := 'paeth';
+ else Result := 'none';
+ end;
+ end;
+
+ function SameBackgroundColor: Boolean;
+ var
+ FirstBgColor: TColor;
+ I: Integer;
+ First: Boolean;
+ begin
+ //Determine whether the background color of all selected images is the same
+ FirstBgColor := clNone;
+ First := True;
+ Result := True;
+ for I := 0 to lbxImages.Items.Count - 1
+ do if lbxImages.Selected[I]
+ then if First
+ then begin
+ //Found the first selected and its background color
+ FirstBgColor := Images.Items[I].Background;
+ First := False;
+ end
+ else begin
+ //If not equal to first background color, then break, continue otherwise
+ Result := FirstBgColor = Images.Items[I].Background;
+ if not Result
+ then Break;
+ end;
+ end;
+
+const
+ NoneSelected = '[ none ]';
+ MultipleSelected = '[ multiple ]';
+begin
+with lbxImages
+do begin
+ //Refresh the enabled state of the buttons and controls
+ btnReplace.Enabled := SelCount = 1;
+ btnDelete.Enabled := SelCount > 0;
+ btnClear.Enabled := Items.Count > 0;
+ btnUp.Enabled := (SelCount > 0) and (FirstSelected > 0);
+ btnDown.Enabled := (SelCount > 0) and (LastSelected < Items.Count - 1);
+ lblName.Enabled := SelCount = 1;
+ edtName.Enabled := SelCount = 1;
+ lblBackgroundColor.Enabled := SelCount > 0;
+ cmbBackgroundColor.Enabled := SelCount > 0;
+ case SelCount of
+ 0: begin
+ //None is selected, so no information to display
+ lblDimensionsValue.Caption := NoneSelected;
+ lblColorDepthValue.Caption := NoneSelected;
+ lblTransparencyValue.Caption := NoneSelected;
+ lblCompressionValue.Caption := NoneSelected;
+ lblFilteringValue.Caption := NoneSelected;
+ end;
+ 1: with Images.Items[FirstSelected]
+ do begin
+ edtName.OnChange := nil;
+ try
+ //One item is selected, display its properties and information
+ edtName.Text := Name;
+ SelectBackgroundColor(Sender, Background);
+ lblDimensionsValue.Caption := GetDimensions(PngImage);
+ lblColorDepthValue.Caption := GetColorDepth(PngImage);
+ lblTransparencyValue.Caption := GetTransparency(PngImage);
+ lblCompressionValue.Caption := GetCompression(PngImage);
+ lblFilteringValue.Caption := GetFiltering(PngImage);
+ finally
+ edtName.OnChange := edtNameChange;
+ end;
+ end;
+ else begin
+ //More than 1 is selected, so no image information can be displayed
+ if SameBackgroundColor
+ then SelectBackgroundColor(Sender, Images.Items[FirstSelected].Background)
+ else SelectBackgroundColor(Sender, clNone);
+ lblDimensionsValue.Caption := MultipleSelected;
+ lblColorDepthValue.Caption := MultipleSelected;
+ lblTransparencyValue.Caption := MultipleSelected;
+ lblCompressionValue.Caption := MultipleSelected;
+ lblFilteringValue.Caption := MultipleSelected;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesDblClick(Sender: TObject);
+begin
+//Doubleclicking is the same as the Replace button
+if lbxImages.SelCount = 1
+then btnReplaceClick(nil);
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
+
+ procedure MoveItem(Index, Delta: Integer);
+ begin
+ //Move a single item up or down, depending on Delta
+ if lbxImages.Selected[Index]
+ then begin
+ Images.Items[Index].Index := Index + Delta;
+ lbxImages.Items.Exchange(Index, Index + Delta);
+ lbxImages.Selected[Index + Delta] := True;
+ end;
+ end;
+
+ function InRange(Index: Integer): Boolean;
+ begin
+ //Return whether Index exists in the listbox
+ Result := (Index >= 0) and (Index < lbxImages.Items.Count);
+ end;
+
+var
+ NewIndex, NewItemIndex, Delta, I: Integer;
+begin
+Accept := DraggingIndex >= 0;
+if Accept
+then begin
+ //Figure out to which index is dragged
+ NewIndex := lbxImages.ItemAtPos(Point(X, Y), False);
+ if NewIndex > lbxImages.Items.Count - 1
+ then NewIndex := lbxImages.Items.Count - 1;
+
+ //Figure out the distance (delta) of the drag
+ Delta := NewIndex - DraggingIndex;
+
+ //The destination index has to exist and has to be differend from where we
+ //started the drag. On to pof that, the drag destination of the first and
+ //last selected items have to be in range.
+ if (NewIndex >= 0) and (NewIndex <> DraggingIndex) and InRange(FirstSelected + Delta) and InRange(LastSelected + Delta)
+ then begin
+ //Calc the new focus index
+ NewItemIndex := lbxImages.ItemIndex + Delta;
+
+ //To prevent things to get messed up, moving downwards needs walking through the
+ //images in opposite direction
+ if Delta < 0
+ then for I := 0 to lbxImages.Items.Count - 1
+ do MoveItem(I, Delta)
+ else for I := lbxImages.Items.Count - 1 downto 0
+ do MoveItem(I, Delta);
+
+ //Set the new focus index and tracking value of the drag
+ lbxImages.ItemIndex := NewItemIndex;
+ DraggingIndex := NewIndex;
+
+ lbxImagesClick(nil);
+ end;
+ end;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
+var
+ DrawRect: TRect;
+ ScrollInfo: TScrollInfo;
+ I, ScrollPos: Integer;
+begin
+//Get the scrolling distance
+ScrollPos := 0;
+ScrollInfo.cbSize := SizeOf(ScrollInfo);
+ScrollInfo.fMask := SIF_POS;
+if GetScrollInfo(lbxImages.Handle, SB_VERT, ScrollInfo)
+then for I := 0 to ScrollInfo.nPos - 1
+ do with lbxImages.ItemRect(I)
+ do Inc(ScrollPos, Bottom - Top);
+
+//First, draw the background
+if odSelected in State
+then if lbxImages.Focused
+ then DrawBackground(lbxImages.Canvas, Rect, ScrollPos, cmbPreviewBackground.ItemIndex, SelectionBodyColor)
+ else DrawBackground(lbxImages.Canvas, Rect, ScrollPos, cmbPreviewBackground.ItemIndex, Blend(SelectionBodyColor, clWindow, 50))
+else DrawBackground(lbxImages.Canvas, Rect, ScrollPos, cmbPreviewBackground.ItemIndex);
+with lbxImages.Canvas
+do begin
+ //Then, draw a focus border, if focused
+ Brush.Style := bsClear;
+ if odFocused in State
+ then begin
+ if lbxImages.Focused
+ then Pen.Color := SelectionBorderColor
+ else Pen.Color := Blend(SelectionBorderColor, clWindow, 50);
+ Pen.Style := psSolid;
+ Rectangle(Rect);
+ end;
+
+ //Draw the image at the center of (Rect.Left, Rect.Top, Rect.Left + MaxWidth,
+ //Rect.Bottom)
+ with Images.Items[Index]
+ do begin
+ DrawRect.Left := Rect.Left + (MaxWidth - PngImage.Width) div 2 + 2;
+ DrawRect.Top := Rect.Top + (Rect.Bottom - Rect.Top - PngImage.Height) div 2;
+ DrawRect.Right := DrawRect.Left + PngImage.Width;
+ DrawRect.Bottom := DrawRect.Top + PngImage.Height;
+ PngImage.Draw(lbxImages.Canvas, DrawRect);
+ end;
+
+ //Draw the image index number and the name
+ Font.Color := clWindowText;
+ DrawRect := Classes.Rect(Rect.Left + MaxWidth + 8, Rect.Top, Rect.Left + MaxWidth + Canvas.TextWidth(IntToStr(lbxImages.Items.Count - 1)) + 8, Rect.Bottom);
+ DrawText(Handle, PChar(IntToStr(Index)), -1, DrawRect, DT_RIGHT or DT_NOPREFIX or DT_SINGLELINE or DT_VCENTER);
+ DrawRect.Left := DrawRect.Right;
+ DrawRect.Right := Rect.Right;
+ DrawText(Handle, PChar(' - ' + Images.Items[Index].Name), -1, DrawRect, DT_END_ELLIPSIS or DT_LEFT or DT_NOPREFIX or DT_SINGLELINE or DT_VCENTER);
+
+ //Draw the normal focusrect, so that it'll become invisible
+ if (odFocused in State) and lbxImages.Focused
+ then DrawFocusRect(Rect);
+ end;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesEnter(Sender: TObject);
+begin
+//Just to be sure
+lbxImages.Repaint;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesExit(Sender: TObject);
+begin
+//Just to be sure
+lbxImages.Repaint;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+begin
+//I would expect this "ctrl"-navigation would work standardly, but appearantly
+//it doesn't, so we'll have to code it ourselves
+with lbxImages
+do if ssCtrl in Shift
+ then begin
+ case Key of
+ VK_DOWN: begin
+ if ItemIndex < Items.Count - 1
+ then ItemIndex := ItemIndex + 1;
+ Key := 0;
+ end;
+ VK_UP: begin
+ if ItemIndex > 0
+ then ItemIndex := ItemIndex - 1;
+ Key := 0;
+ end;
+ VK_SPACE: begin
+ Selected[ItemIndex] := not Selected[ItemIndex];
+ lbxImagesClick(nil);
+ Key := 0;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesMeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);
+var
+ Temp: Integer;
+begin
+//Figure out the height of an item, when editing an image collection, the height
+//of an image may differ
+Height := Images.Items[Index].PngImage.Height + 4;
+Temp := lbxImages.Canvas.TextHeight('0') + 4;
+if Temp > Height
+then Height := Temp;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+//If the mouse button is released, the tracking value of the drag needs to be
+//reset as well
+DraggingIndex := -1;
+end;
+
+procedure TPngImageListEditorDlg.lbxImagesStartDrag(Sender: TObject; var DragObject: TDragObject);
+var
+ Pos: TPoint;
+begin
+//Figure out where this drag start is
+GetCursorPos(Pos);
+DraggingIndex := lbxImages.ItemAtPos(lbxImages.ScreenToClient(Pos), True);
+if DraggingIndex >= 0
+then lbxImages.ItemIndex := DraggingIndex;
+end;
+
+initialization
+ InitResolution;
+
+end.
diff --git a/internal/1.0 RC3/1/Docs/Changelog.txt b/internal/1.0 RC3/1/Docs/Changelog.txt
new file mode 100644
index 0000000..d96f04a
--- /dev/null
+++ b/internal/1.0 RC3/1/Docs/Changelog.txt
@@ -0,0 +1,37 @@
+PngComponents 1.0 RC3:
+- Editor: Fixed "invalid header" exception when adding a PNG to the list.
+- Editor: Everything should now look good on "large fonts" setting.
+- PngBitBtn: Positioning and drawing of the glyph was sometimes a bit odd.
+- PngBitBtn: Removed the need to draw an empty TBitmap glyph, prior to drawing the PNG glyph.
+- PngSpeedButton: The image is now shifted down-right by 1 pixel, when the button is down but not pressed, to match the behavior of a normal SpeedButton.
+- PngImageList: Fixed range check errors in PngToIcon32.
+- PngImageList: Fixed possible AccessViolation in PngToIcon32.
+- PngImageList: Fixed AccessViolation in AddImages.
+- PngImageList: Fixed memory leak in CopyPngs.
+- PngImageList: Added BeginUpdate and EndUpdate methods, to temporarily prevent the internal imagelist from being updated.
+- PngImageList: The patched methods are more efficient, because they now manipulate the internal imagelist directly, rather than relying on CopyPngs.
+- PngImageList: Added calls to Change in the patched methods.
+
+PngComponents 1.0 RC2:
+- Editor: Fixed endless loop when repetitively removing the last image in a list of at least 3 (thanks to Aleksander Oven).
+- Editor: Fixed possible out-of-bounds error when moving an image down using the Down button (thanks to Spiril).
+- Editor: Now using Graphics.GetColorValues to retrieve available color identifiers (thanks to LJ and Ryan Mills).
+- Editor: Rewritten ParseBackgroundColor and SelectBackgroundColor to use IdentToColor, StringToColor and ColorToIdent from Gaphics unit (thanks to LJ and Ryan Mills).
+- Editor: It is now possible to set the background color to more than 1 selected image.
+- Editor: Minor GUI fixes
+- PngBitBtn: When Margin <> -1 and the button is focused, the image must be shifted 1 pixel, to match the behavior of a normal BitBtn.
+- PngBitBtn: Fixed EPngHeaderNotPresent when assigning a nil to the PngImage property.
+- PngBitBtn: PngImage property now behaves correctly when assigning an action. Note that the image will not be stored in the DFM if it came from a TActionList.ImageList (thanks to robvdl)
+- PngSpeedButton: The same fixes that apply to PngBitBtn, applied to PngSpeedButton.
+- PngImageList: Adding a default action to an imagelist no longer results in out of bounds errors (thanks to robvdl).
+- PngImageList: 14 methods that couldn't be overridden are now patched (thanks to Vladimir Bochkarev). However, adding a default action to an imagelist still doesn't call the "new" Add method, but supposedly the legacy ImageList_Add() function, which cannot be patched.
+- PngImageList: Fixed memory leak in CopyPngs (thanks to M. Youssfi).
+- Common: Added Amount parameter to MakeImageBlended and MakeImageGrayscale.
+- Common: Added function ConvertToPNG, which converts a TGraphic to a PNG object, if not already.
+- Common: Added functions CreatePNG and CreatePNGMasked, which create a new PNG object based on a bitmap and a (color or bitmap) mask.
+- Common: Added function CopyImageFromImageList, which effectively copies an image from a normal imagelist or a PngImageList into a PNG.
+- Common: Added function SlicePNG for future use. This slices a large PNG object into smaller, equally-sized ones.
+- Common: Added zlib version 1.2.2 to the PNG package (thanks to Vladimir Bochkarev).
+
+PngComponents 1.0 RC1:
+- Initial public release
\ No newline at end of file
diff --git a/internal/1.0 RC3/1/Docs/License.txt b/internal/1.0 RC3/1/Docs/License.txt
new file mode 100644
index 0000000..b279ad4
--- /dev/null
+++ b/internal/1.0 RC3/1/Docs/License.txt
@@ -0,0 +1,73 @@
+END-USER LICENSE AGREEMENT
+
+All files included in this archive are Copyright (C) 2002-2005
Martijn Saly.
+Use and/or distribution of them requires acceptance of the following License
+Agreement.
+
+--------------------------------------------------------------------------------
+
+- "Author" herein refers to Martijn Saly (the creator of this package and
+ containing files and software).
+- "Software" herein refers to all files bearing this notice, as well as any
+ other files and source code included with this package (typically extracted
+ from a .zip or .cab archive), and all content in them, regardless of whether
+ any modifications have been made.
+- "Compile" herein refers to the automatic process of translating the Software's
+ source code into executable machine code by a compiler such as the one
+ included with Borland's Delphi or C++Builder.
+
+Except where otherwise noted, all of the documentation and Software included in
+the this package is copyrighted by Martijn Saly (the Author).
+
+Copyright (C) 2002-2005 Martijn Saly. All rights reserved.
+
+
+Use and distribution of the software is permitted provided that all of the
+following terms are accepted. Terms 5 through 8 apply only to distributions
+which include source code that one can Compile.
+
+1) The Software is provided "as-is," without any express or implied warranty. In
+ no event shall the Author be held liable for any damages arising from the use
+ or Compile of the Software.
+
+2) All redistributions of the Software's files must be in their original,
+ unmodified form. Distributions of modified versions of the files is not
+ permitted without express written permission of the Author.
+
+3) All redistributions of the Software's files must retain all copyright notices
+ and web site addresses that are currently in place, and must include this
+ list of conditions in its original, unmodified form.
+
+4) None of the Software's files may be redistributed for profit or as part of
+ another software package without express written permission of the Author.
+
+5) If applicable, you are permitted to Compile the Software, in orginal or
+ modified form, into any kind of application, including commercial or
+ shareware applications, or any application you are profiting from.
+
+6) If applicable, redistribution of any of the Software's files in object form
+ (including but not limited to .DCU and .OBJ formats) is strictly prohibited
+ without express written permission of the Author.
+
+7) If applicable, distribution of the Software in compiled package format
+ (the BPL file) is permitted, as long as the Software is distributed as part
+ of an application.
+
+8) If applicable, distribution of the Software in compiled package format
+ (the BPL file) is prohibed if the distribution does not specifically belong
+ to an application, written by the same author as the application was written
+ by.
+
+9) Full backward compatibility in future versions of the Software is not
+ guaranteed. In no event shall the Author be held liable for any inconvenience
+ or damages arising from lack of backward compatibility.
+
+If you do not agree to all of the above terms, you are not permitted to use or
+Compile the Software in any way, and all copies of it must be deleted from your
+system(s).
+
+----------------------------------------------------------------------------
+
+Martijn Saly
+martijn@thany.org
+http://www.thany.org/
\ No newline at end of file
diff --git a/internal/1.0 RC3/1/Docs/PngComponents.html b/internal/1.0 RC3/1/Docs/PngComponents.html
new file mode 100644
index 0000000..1e3922c
--- /dev/null
+++ b/internal/1.0 RC3/1/Docs/PngComponents.html
@@ -0,0 +1,105 @@
+
+
+
+ PngComponents
+
+
+
+
+
PngComponents
+
This version: 1.0 RC2
+
+
What is PngComponents?
+
PngComponents is a set of components that allows you to include in your application real PNG files. PNG files on their own do not generate an enourmous advantage, but their support for an alpha-channel does indeed have quite a charm to it. The PngComponents library supports alpha-channels to their full extend, using a modified version of the excellent pngdelphi library.
+
+
+
+
+
+
+
+
Examples of PNG images with alpha-channels. Note that these don't work correctly in Internet Explorer (all versions up to 6).
+
+
+
PngComponents' main and most important component is the PngImageList. This is a descendant of the normal TImageList, with in addition full support for PNGs with an alpha-channel. This will enable you to keep using most components that take advantage of imagelists, while actually feeding them icons with alphablending capabilities. Two other very nice components are the PngSpeedButton and the PngBitBtn. These two buttons do not have a Glyph anymore, but in stead, they accept a PNG file to be assigned directly to the button, without the need for an imagelist (just like the normal SpeedButton and BitBtn). And since the PNG glyphs are drawn in realtime, there's no more hassling with WM_DISPLAYCHANGE when the user changes the clBtnFace color in his display settings...
+
Two other components included in the library are the PngImageCollection, which is simply a collection of PNG images. Nothing more, nothing less. The last one is the PngCheckListBox. This one accepts PNG glyphs for the check states. Beside that, it's a completely normal CheckListBox.
+
I've also added a "fix" for Alex Desinov's awesome addon for Jordan Russell's Toolbar2000, called TBX. This fix is a replacement for the OfficeXP theme. Just replace TBXOfficeXPTheme in your uses clause with PngTBXOfficeXPTheme and that's it! Beautiful alphablended icons become possible in the OfficeXP theme as well.
+
+
Why should I use PngComponents?
+
The PngComponents library offers a major leap forward in creating nice GUI's in designtime. Not only does it speed up the implementation of alphablended icons in your application, it eases the way you can use them throughout your software. No longer do you need to put them in a resource file manually and then manually drawing them on a temporary bitmap and assigning that to somewhere. Adding beautiful alphablended icons to your interface is but a few clicks away.
+
+
Usage
+
+
Common
+
The PngBitBtn and PngSpeedButton both have two extra properties, PngImage and PngOptions. PngImage substitutes the Glyph property with a PNG image, so only PNG files can be loaded into it. PngOptions determines what a disabled glyph looks like. You can choose from a combination of having it blended and having it grayscaled.
+
The PngImageList and PngImageCollection share the same editor. This editor can be used to load PNG files into the respective component. When editing a PngImageList, the editor will only allow PNG files that have the correct dimensions. When editing a PngImageCollection, any PNG can be added. Note that in either case, it doesn't matter if you mix color depths or other properties.
+
Note: the beta versions of PngComponents required that you use a PngImageCollection and assign it to the PngImageList.PngImages property. That is no longer the case, i.o.w. the components have been separated completely.
+
+
The editor
+
As said before, the PngImageList and PngImageCollection share an editor that allows to modify the contents of the respective component:
+
+
The Add button will ask for a PNG image. After that, you may set its name and background color. Note that you can select multiple files and add them all at once.
+
The Delete button deletes the currently selected image(s), after having asked for confirmation.
+
The Replace button only works when a single image is selected. It will ask for a PNG file and will replace the actual image.
+
The Clear button empties the list, after having asked for confirmation.
+
The Up button moves the currently selected images one position up, if possible.
+
The Down button moves the currently selected images one position down, if possible.
+
You can also drag images in the listbox. They'll be moved as you drag them, in realtime.
+
Remember that you can select multiple images, for your convenience.
+
+
The editor will show up when you doubleclick the PngImageList or PngImageCollection component. You may also select Edit images... from its context menu, or doubleclick the PngImageList.PngImages or PngImageCollection.Items property.
+
+
The ImageList
+
The ImageList has some features and issues you should probably know about:
+
+
The images you add to the list are internally pumped into the "real" imagelist, so that native "API" windows controls, like listviews and treeviews, can take advantage of it. Even though PngImageList tries to make the best out of it, Windows 2000 and earlier simply do not support an alpha channel in an icon and may therefor display it incorrectly. This also applies on Windows XP and later, if you forget to add a manifest to your application. Note that themes support is not required for this to work, just a manifest is enough (themes may even be unavailable).
+
The editor will not crop or resize images that do not conform the dimensions of the imagelist. Unfortunately, this is extremely hard when working with PNG images, due to limitations in the pngdelphi library.
+
Components that do not natively support the PngImageList will not draw disabled images correctly. Those components usually have their own algorithm to generate disabled images, which will not work with the modern-style flashy colorful alpha-blended PNG images. You may want to include another imagelist with the same images, but with the EnabledImages property set to False.
+
+
+
The OfficeXP fix
+
A small introduction: Jordan Russell's Toolbar2000 is a set of components for creating Office 2000-style toolbars and such. Alex Desinov's TBX is an add-on package that adds even more functionality as well as theming. This allows for themes like "OfficeXP", "Office2003" and more.
+
The OfficeXP theme comes standard with TBX and it's the one getting in major trouble when using in combination with PngComponents. The alpha-blended area's look ugly, images may show dark borders, and other kinds of artefacts may show up.
+
The fix I've included is as simple as it is effective; it's a unit called PngTBXOfficeXPTheme. If you replace TBXOfficeXPTheme in your uses clauses with PngTBXOfficeXPTheme, you should be all set! You will not have the fancy looks in designtime, but in runtime your application will look better than ever.
+
Warning! If you still need TBXOfficeXPTheme included in your uses clause, then make sure PngTBXOfficeXPTheme gets initialized after TBXOfficeXPTheme, or it will not work as expected.
+
+
Miscellaneous
+
Feedback
+
I love to get feedback! You can either go to the newsgroup or send me an e-mail if you have a specific question.
+
Legal
+
See the License.txt file included in the archive. If the file is not there, the ZIP file is not a genuine PngComponents download!
+
+
+
This page is best viewed with Opera or Firefox. This page is also optmized for printing.
+
+
\ No newline at end of file
diff --git a/internal/1.0 RC3/1/Docs/PngDelphi.chm b/internal/1.0 RC3/1/Docs/PngDelphi.chm
new file mode 100644
index 0000000..6821208
Binary files /dev/null and b/internal/1.0 RC3/1/Docs/PngDelphi.chm differ
diff --git a/internal/1.0 RC3/1/Docs/pngimage.chm b/internal/1.0 RC3/1/Docs/pngimage.chm
new file mode 100644
index 0000000..c7e51b2
Binary files /dev/null and b/internal/1.0 RC3/1/Docs/pngimage.chm differ
diff --git a/internal/1.0 RC3/1/Example Images/Computer_32.png b/internal/1.0 RC3/1/Example Images/Computer_32.png
new file mode 100644
index 0000000..a9b6ac5
Binary files /dev/null and b/internal/1.0 RC3/1/Example Images/Computer_32.png differ
diff --git a/internal/1.0 RC3/1/Example Images/FolderClosed_32.png b/internal/1.0 RC3/1/Example Images/FolderClosed_32.png
new file mode 100644
index 0000000..42ad8ac
Binary files /dev/null and b/internal/1.0 RC3/1/Example Images/FolderClosed_32.png differ
diff --git a/internal/1.0 RC3/1/Example Images/FolderOpen_32.png b/internal/1.0 RC3/1/Example Images/FolderOpen_32.png
new file mode 100644
index 0000000..370b5c4
Binary files /dev/null and b/internal/1.0 RC3/1/Example Images/FolderOpen_32.png differ
diff --git a/internal/1.0 RC3/1/Example Images/RemoteComputer_32.png b/internal/1.0 RC3/1/Example Images/RemoteComputer_32.png
new file mode 100644
index 0000000..8e514d1
Binary files /dev/null and b/internal/1.0 RC3/1/Example Images/RemoteComputer_32.png differ
diff --git a/internal/1.0 RC3/1/Include/Thany.inc b/internal/1.0 RC3/1/Include/Thany.inc
new file mode 100644
index 0000000..d810ed8
--- /dev/null
+++ b/internal/1.0 RC3/1/Include/Thany.inc
@@ -0,0 +1,276 @@
+{$B-}
+{$X+}
+{$T+}
+{$P+}
+{$H+}
+{$J-}
+
+{$IFNDEF WIN32}
+ Thany components do not support 16-bit Windows.
+{$ENDIF}
+
+{$IFDEF VER180}
+ {$DEFINE THANY_COMPILER_10}
+ {$IFDEF BCB}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_10}
+ {$ELSE}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_10}
+ {$ENDIF}
+{$ENDIF}
+
+
+{$IFDEF VER170}
+ {$DEFINE THANY_COMPILER_9}
+ {$IFDEF BCB}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_9}
+ {$ELSE}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_9}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VER150}
+ {$DEFINE THANY_COMPILER_7}
+ {$IFDEF BCB}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_7}
+ {$ELSE}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_7}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VER140}
+ {$DEFINE THANY_COMPILER_6}
+ {$IFDEF BCB}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_6}
+ {$ELSE}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_6}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VER130}
+ {$DEFINE THANY_COMPILER_5}
+ {$IFDEF BCB}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_5}
+ {$ELSE}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_5}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF VER125}
+ {$DEFINE THANY_COMPILER_4}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_4}
+{$ENDIF}
+
+{$IFDEF VER120}
+ {$DEFINE THANY_COMPILER_4}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_4}
+{$ENDIF}
+
+{$IFDEF VER110}
+ {$DEFINE THANY_COMPILER_3}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_3}
+{$ENDIF}
+
+{$IFDEF VER100}
+ {$DEFINE THANY_COMPILER_3}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_3}
+{$ENDIF}
+
+{$IFDEF VER93}
+ {$DEFINE THANY_COMPILER_2}
+ {$DEFINE THANY_CPPB}
+ {$DEFINE THANY_CPPB_1}
+{$ENDIF}
+
+{$IFDEF VER90}
+ {$DEFINE THANY_COMPILER_2}
+ {$DEFINE THANY_DELPHI}
+ {$DEFINE THANY_DELPHI_2}
+{$ENDIF}
+
+{$IFNDEF THANY_CPPB}
+ {$IFNDEF THANY_DELPHI}
+ {$DEFINE THANY_UNKNOWN_COMPILER}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_2}
+ {$DEFINE THANY_COMPILER_2_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_3}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_4}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+ {$DEFINE THANY_COMPILER_4_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_5}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+ {$DEFINE THANY_COMPILER_4_UP}
+ {$DEFINE THANY_COMPILER_5_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_6}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+ {$DEFINE THANY_COMPILER_4_UP}
+ {$DEFINE THANY_COMPILER_5_UP}
+ {$DEFINE THANY_COMPILER_6_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_7}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+ {$DEFINE THANY_COMPILER_4_UP}
+ {$DEFINE THANY_COMPILER_5_UP}
+ {$DEFINE THANY_COMPILER_6_UP}
+ {$DEFINE THANY_COMPILER_7_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_9}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+ {$DEFINE THANY_COMPILER_4_UP}
+ {$DEFINE THANY_COMPILER_5_UP}
+ {$DEFINE THANY_COMPILER_6_UP}
+ {$DEFINE THANY_COMPILER_7_UP}
+ {$DEFINE THANY_COMPILER_9_UP}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_10}
+ {$DEFINE THANY_COMPILER_2_UP}
+ {$DEFINE THANY_COMPILER_3_UP}
+ {$DEFINE THANY_COMPILER_4_UP}
+ {$DEFINE THANY_COMPILER_5_UP}
+ {$DEFINE THANY_COMPILER_6_UP}
+ {$DEFINE THANY_COMPILER_7_UP}
+ {$DEFINE THANY_COMPILER_9_UP}
+ {$DEFINE THANY_COMPILER_10_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_2}
+ {$DEFINE THANY_DELPHI_2_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_3}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_4}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+ {$DEFINE THANY_DELPHI_4_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_5}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+ {$DEFINE THANY_DELPHI_4_UP}
+ {$DEFINE THANY_DELPHI_5_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_6}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+ {$DEFINE THANY_DELPHI_4_UP}
+ {$DEFINE THANY_DELPHI_5_UP}
+ {$DEFINE THANY_DELPHI_6_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_7}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+ {$DEFINE THANY_DELPHI_4_UP}
+ {$DEFINE THANY_DELPHI_5_UP}
+ {$DEFINE THANY_DELPHI_6_UP}
+ {$DEFINE THANY_DELPHI_7_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_9}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+ {$DEFINE THANY_DELPHI_4_UP}
+ {$DEFINE THANY_DELPHI_5_UP}
+ {$DEFINE THANY_DELPHI_6_UP}
+ {$DEFINE THANY_DELPHI_7_UP}
+ {$DEFINE THANY_DELPHI_9_UP}
+{$ENDIF}
+
+{$IFDEF THANY_DELPHI_10}
+ {$DEFINE THANY_DELPHI_2_UP}
+ {$DEFINE THANY_DELPHI_3_UP}
+ {$DEFINE THANY_DELPHI_4_UP}
+ {$DEFINE THANY_DELPHI_5_UP}
+ {$DEFINE THANY_DELPHI_6_UP}
+ {$DEFINE THANY_DELPHI_7_UP}
+ {$DEFINE THANY_DELPHI_9_UP}
+ {$DEFINE THANY_DELPHI_10_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_3}
+ {$DEFINE THANY_CPPB_3_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_4}
+ {$DEFINE THANY_CPPB_3_UP}
+ {$DEFINE THANY_CPPB_4_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_5}
+ {$DEFINE THANY_CPPB_3_UP}
+ {$DEFINE THANY_CPPB_4_UP}
+ {$DEFINE THANY_CPPB_5_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_6}
+ {$DEFINE THANY_CPPB_3_UP}
+ {$DEFINE THANY_CPPB_4_UP}
+ {$DEFINE THANY_CPPB_5_UP}
+ {$DEFINE THANY_CPPB_6_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_7}
+ {$DEFINE THANY_CPPB_3_UP}
+ {$DEFINE THANY_CPPB_4_UP}
+ {$DEFINE THANY_CPPB_5_UP}
+ {$DEFINE THANY_CPPB_6_UP}
+ {$DEFINE THANY_CPPB_7_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_9}
+ {$DEFINE THANY_CPPB_3_UP}
+ {$DEFINE THANY_CPPB_4_UP}
+ {$DEFINE THANY_CPPB_5_UP}
+ {$DEFINE THANY_CPPB_6_UP}
+ {$DEFINE THANY_CPPB_7_UP}
+ {$DEFINE THANY_CPPB_9_UP}
+{$ENDIF}
+
+{$IFDEF THANY_CPPB_3_UP}
+ // C++Builder requires this if you use Delphi components in run-time packages.
+ {$ObjExportAll On}
+{$ENDIF}
+
+{$IFDEF THANY_COMPILER_7_UP}
+ {$DEFINE ThemeSupport}
+{$ENDIF}
diff --git a/internal/1.0 RC3/1/InstallLogD7.txt b/internal/1.0 RC3/1/InstallLogD7.txt
new file mode 100644
index 0000000..66615c4
--- /dev/null
+++ b/internal/1.0 RC3/1/InstallLogD7.txt
@@ -0,0 +1,598 @@
+***************************************
+BEGIN: Unregistering Component Package
+***************************************
+
+Cleaning Known Package Registry Entry
+
+Reading Packages:
+c:\archivos de programa\borland\delphi7\Bin\dclite70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclindy70.bpl
+$(Delphi)\Bin\dclstd70.bpl
+$(Delphi)\Bin\dcldb70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclsmp70.bpl
+$(Delphi)\Bin\dclbde70.bpl
+$(Delphi)\Bin\dbx70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclado70.bpl
+c:\archivos de programa\borland\delphi7\Bin\DCLIB70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclclxdb70.bpl
+$(Delphi)\Bin\dclclxstd70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclsmpedit70.bpl
+c:\archivos de programa\borland\delphi7\Bin\applet70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclemacsedit70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclact70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclmlwiz70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclshlctrls70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclofficexp70.bpl
+D:\Proyectos\Componentes\AM2000\Lib\D7\am2000_d7.bpl
+D:\Proyectos\Componentes\CETools\Lib\d7\cetoolspkgd7.bpl
+D:\Proyectos\Componentes\FastReport\Lib\D7\fr7.bpl
+D:\Proyectos\Componentes\FastReport\Lib\D7\FRIBX7.bpl
+D:\Proyectos\Componentes\FthLib\Lib\D7\dclFth70.bpl
+D:\Proyectos\Componentes\TMS\Lib\D7\TMSD7.bpl
+D:\Proyectos\Componentes\TMS\Lib\D7\TMSDED7.bpl
+D:\Proyectos\Componentes\Rodax\Lib\D7\RodaxD7.bpl
+$(Delphi)\Projects\Bpl\dclrx7.bpl
+$(Delphi)\Projects\Bpl\dclrxbd7.bpl
+$(Delphi)\Projects\Bpl\DclRxDb7.bpl
+C:\ARCHIV~1\Borland\Delphi7\Projects\Bpl\JclDebugIdeD70.bpl
+C:\ARCHIV~1\Borland\Delphi7\Projects\Bpl\ProjectAnalyzerD70.bpl
+C:\ARCHIV~1\Borland\Delphi7\Projects\Bpl\IdeOpenDlgFavoriteD70.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressLibrary\LibD7\dclcxLibraryVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressEditors Library 5\LibD7\dclcxEditorsVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressEditors Library 5\LibD7\dclcxExtEditorsVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPageControl 2\LibD7\dclcxPageControlVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressQuantumGrid 5\LibD7\dclcxGridVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxDockingD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressQuantumTreeList 4\LibD7\dclcxTreeListVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressDBTree Suite\LibD7\dcldxDBTrD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressScheduler\LibD7\dclcxSchedulerVCLD7.bpl
+$(Delphi)\Projects\Bpl\JvAppFrmD7D.bpl
+$(Delphi)\Projects\Bpl\JvCoreD7D.bpl
+$(Delphi)\Projects\Bpl\JvBandsD7D.bpl
+$(Delphi)\Projects\Bpl\JvBDED7D.bpl
+$(Delphi)\Projects\Bpl\JvDBD7D.bpl
+$(Delphi)\Projects\Bpl\JvCmpD7D.bpl
+$(Delphi)\Projects\Bpl\JvCryptD7D.bpl
+$(Delphi)\Projects\Bpl\JvCtrlsD7D.bpl
+$(Delphi)\Projects\Bpl\JvCustomD7D.bpl
+$(Delphi)\Projects\Bpl\JvDlgsD7D.bpl
+$(Delphi)\Projects\Bpl\JvDockingD7D.bpl
+$(Delphi)\Projects\Bpl\JvDotNetCtrlsD7D.bpl
+$(Delphi)\Projects\Bpl\JvEDID7D.bpl
+$(Delphi)\Projects\Bpl\JvGlobusD7D.bpl
+$(Delphi)\Projects\Bpl\JvHMID7D.bpl
+$(Delphi)\Projects\Bpl\JvInspectorD7D.bpl
+$(Delphi)\Projects\Bpl\JvInterpreterD7D.bpl
+$(Delphi)\Projects\Bpl\JvJansD7D.bpl
+$(Delphi)\Projects\Bpl\JvManagedThreadsD7D.bpl
+$(Delphi)\Projects\Bpl\JvMMD7D.bpl
+$(Delphi)\Projects\Bpl\JvNetD7D.bpl
+$(Delphi)\Projects\Bpl\JvPageCompsD7D.bpl
+$(Delphi)\Projects\Bpl\JvPluginD7D.bpl
+$(Delphi)\Projects\Bpl\JvPrintPreviewD7D.bpl
+$(Delphi)\Projects\Bpl\JvStdCtrlsD7D.bpl
+$(Delphi)\Projects\Bpl\JvSystemD7D.bpl
+$(Delphi)\Projects\Bpl\JvTimeFrameworkD7D.bpl
+$(Delphi)\Projects\Bpl\JvUIBD7D.bpl
+$(Delphi)\Projects\Bpl\JvValidatorsD7D.bpl
+$(Delphi)\Projects\Bpl\JvWizardD7D.bpl
+$(Delphi)\Projects\Bpl\JvXPCtrlsD7D.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Core_D7.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_IDE_D7.bpl
+$(CommonProgramFiles)\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D7.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_WebBroker_D7.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Indy_D7.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_RODX_D7.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_BPDX_D7.bpl
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_DataSnap_D7.bpl
+$(ProgramFiles)\RemObjects Software\Pascal Script\Dcu\D7\PascalScript_Core_D7.bpl
+$(ProgramFiles)\RemObjects Software\Pascal Script\Dcu\D7\PascalScript_RO_D7.bpl
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_Core_D7.bpl
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_IDE_D7.bpl
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_ADODriver_D7.bpl
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_IBXDriver_D7.bpl
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_DBXDriver_D7.bpl
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_Scripting_D7.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclnet70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dcldbx70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclwbm70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclie70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dcltee70.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxsbD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressNavBar\LibD7\dcldxNavBarD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressSpreadSheet\LibD7\dclcxSpreadSheetVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressVerticalGrid\LibD7\dclcxVerticalGridVCLD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressDBTree Suite\LibD7\dcldxTrMDD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSLnksD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPScxCommonD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPscxTLLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSTeeChartD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPScxGridLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPScxSSLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPScxVGridLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBTVLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxLCLnkD7.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclmcn70.bpl
+$(Delphi)\Bin\dclmid70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclsoap70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dclocx70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dcldbxcds70.bpl
+c:\archivos de programa\borland\delphi7\Bin\DBWEBXPRT.BPL
+c:\archivos de programa\borland\delphi7\Bin\dclwebsnap70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dcldss70.bpl
+c:\archivos de programa\borland\delphi7\Bin\dcl31w70.bpl
+$(SystemRoot)\system32\ibevnt70.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxBarD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxBarDBNavD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxBarExtDBItemsD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressLayout Control\LibD7\dcldxLayoutControlD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressLayout Control\LibD7\dxLayoutControlcxEditAdaptersD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressMemData\LibD7\dcldxmdsD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dcldxPSCoreD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPScxExtCommonD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPScxPCProdD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSDBTeeChartD7.bpl
+c:\archivos de programa\borland\delphi7\Projects\Bpl\RodaxFrameD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressFlowChart\LibD7\dcldxFlowChartD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressOrgChart\LibD7\dcldxOrgCD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressOrgChart\LibD7\dcldxDBOrD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressMasterView\LibD7\dcldxMasterViewD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxFCLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxMVLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxOCLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBOCLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxBarExtItemsD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressLayout Control\LibD7\dxLayoutControldxEditAdaptersD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBGrLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBTLLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxInsLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxOILnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSPrVwAdvD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSTLLnkD7.bpl
+
+Stripping off path and extension
+dclite70
+dclindy70
+dclstd70
+dcldb70
+dclsmp70
+dclbde70
+dbx70
+dclado70
+DCLIB70
+dclclxdb70
+dclclxstd70
+dclsmpedit70
+applet70
+dclemacsedit70
+dclact70
+dclmlwiz70
+dclshlctrls70
+dclofficexp70
+am2000_d7
+cetoolspkgd7
+fr7
+FRIBX7
+dclFth70
+TMSD7
+TMSDED7
+RodaxD7
+dclrx7
+dclrxbd7
+DclRxDb7
+JclDebugIdeD70
+ProjectAnalyzerD70
+IdeOpenDlgFavoriteD70
+dclcxLibraryVCLD7
+dclcxEditorsVCLD7
+dclcxExtEditorsVCLD7
+dclcxPageControlVCLD7
+dclcxGridVCLD7
+dcldxDockingD7
+dclcxTreeListVCLD7
+dcldxDBTrD7
+dclcxSchedulerVCLD7
+JvAppFrmD7D
+JvCoreD7D
+JvBandsD7D
+JvBDED7D
+JvDBD7D
+JvCmpD7D
+JvCryptD7D
+JvCtrlsD7D
+JvCustomD7D
+JvDlgsD7D
+JvDockingD7D
+JvDotNetCtrlsD7D
+JvEDID7D
+JvGlobusD7D
+JvHMID7D
+JvInspectorD7D
+JvInterpreterD7D
+JvJansD7D
+JvManagedThreadsD7D
+JvMMD7D
+JvNetD7D
+JvPageCompsD7D
+JvPluginD7D
+JvPrintPreviewD7D
+JvStdCtrlsD7D
+JvSystemD7D
+JvTimeFrameworkD7D
+JvUIBD7D
+JvValidatorsD7D
+JvWizardD7D
+JvXPCtrlsD7D
+RemObjects_Core_D7
+RemObjects_IDE_D7
+RemObjects_Everwood_D7
+RemObjects_WebBroker_D7
+RemObjects_Indy_D7
+RemObjects_RODX_D7
+RemObjects_BPDX_D7
+RemObjects_DataSnap_D7
+PascalScript_Core_D7
+PascalScript_RO_D7
+DataAbstract_Core_D7
+DataAbstract_IDE_D7
+DataAbstract_ADODriver_D7
+DataAbstract_IBXDriver_D7
+DataAbstract_DBXDriver_D7
+DataAbstract_Scripting_D7
+dclnet70
+dcldbx70
+dclwbm70
+dclie70
+dcltee70
+dcldxsbD7
+dcldxNavBarD7
+dclcxSpreadSheetVCLD7
+dclcxVerticalGridVCLD7
+dcldxTrMDD7
+dxPSLnksD7
+dxPScxCommonD7
+dxPscxTLLnkD7
+dxPSTeeChartD7
+dxPScxGridLnkD7
+dxPScxSSLnkD7
+dxPScxVGridLnkD7
+dxPSdxDBTVLnkD7
+dxPSdxLCLnkD7
+dclmcn70
+dclmid70
+dclsoap70
+dclocx70
+dcldbxcds70
+DBWEBXPRT
+dclwebsnap70
+dcldss70
+dcl31w70
+ibevnt70
+dcldxBarD7
+dcldxBarDBNavD7
+dcldxBarExtDBItemsD7
+dcldxLayoutControlD7
+dxLayoutControlcxEditAdaptersD7
+dcldxmdsD7
+dcldxPSCoreD7
+dxPScxExtCommonD7
+dxPScxPCProdD7
+dxPSDBTeeChartD7
+RodaxFrameD7
+dcldxFlowChartD7
+dcldxOrgCD7
+dcldxDBOrD7
+dcldxMasterViewD7
+dxPSdxFCLnkD7
+dxPSdxMVLnkD7
+dxPSdxOCLnkD7
+dxPSdxDBOCLnkD7
+dcldxBarExtItemsD7
+dxLayoutControldxEditAdaptersD7
+dxPSdxDBGrLnkD7
+dxPSdxDBTLLnkD7
+dxPSdxInsLnkD7
+dxPSdxOILnkD7
+dxPSPrVwAdvD7
+dxPSTLLnkD7
+
+Reading Packages to remove
+PNG_D7
+PngComponentsD7
+PngComponentsD7D
+
+Stripping off path and extension
+PNG_D7
+PngComponentsD7
+PngComponentsD7D
+
+Scanning for previously installed packages....
+Deleting bpl file: C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\PNG_D7.bpl
+File deleted
+Known Package Registry Entry Cleaned
+
+Cleaning Disabled Package Registry Entry
+
+Reading Packages:
+$(Delphi)\Projects\Bpl\RxCtl7.bpl
+$(Delphi)\Projects\Bpl\RxBDE7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressLayout Control\LibD7\dxLayoutControldxEditAdaptersD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxInsLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBTLLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBGrLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSTLLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxOILnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7\dcldxBarExtItemsD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSPrVwAdvD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressFlowChart\LibD7\dcldxFlowChartD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressOrgChart\LibD7\dcldxOrgCD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressOrgChart\LibD7\dcldxDBOrD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressMasterView\LibD7\dcldxMasterViewD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxFCLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxMVLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxOCLnkD7.bpl
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7\dxPSdxDBOCLnkD7.bpl
+c:\archivos de programa\borland\delphi7\Projects\Bpl\mxPlugIn_D7.bpl
+c:\archivos de programa\borland\delphi7\Projects\Bpl\RodaxFrameD7.bpl
+E:\tmp\UIL\Source\Delphi 7\uPluginFramework7.bpl
+
+Stripping off path and extension
+RxCtl7
+RxBDE7
+dxLayoutControldxEditAdaptersD7
+dxPSdxInsLnkD7
+dxPSdxDBTLLnkD7
+dxPSdxDBGrLnkD7
+dxPSTLLnkD7
+dxPSdxOILnkD7
+dcldxBarExtItemsD7
+dxPSPrVwAdvD7
+dcldxFlowChartD7
+dcldxOrgCD7
+dcldxDBOrD7
+dcldxMasterViewD7
+dxPSdxFCLnkD7
+dxPSdxMVLnkD7
+dxPSdxOCLnkD7
+dxPSdxDBOCLnkD7
+mxPlugIn_D7
+RodaxFrameD7
+uPluginFramework7
+
+Reading Packages to remove
+PNG_D7
+PngComponentsD7
+PngComponentsD7D
+
+Stripping off path and extension
+PNG_D7
+PngComponentsD7
+PngComponentsD7D
+
+Scanning for previously installed packages....
+Disabled Package Registry Entry Cleaned
+
+Reading Search Path Registry Entry
+$(Data Abstract)\DCU\D7
+$(Data Abstract)\Source
+C:\Archivos de programa\Borland\Delphi7\Bin
+C:\Archivos de programa\Borland\Delphi7\Imports
+C:\Archivos de programa\Borland\Delphi7\Lib
+C:\Archivos de programa\Borland\Delphi7\Projects\Bpl
+$(Everwood)\Bin
+C:\Archivos de programa\Developer Express Inc
+C:\Archivos de programa\Developer Express Inc\ExpressBars 5\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressCommon Library\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressDataController\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressDBTree Suite\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressEditors Library 5\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressExport Library\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressGDI+ Library\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressLayout Control\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressLibrary\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressMemData\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressNavBar\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressPageControl 2\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressPrinting System\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressQuantumGrid 5\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressQuantumTreeList 4\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressScheduler\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressSpreadSheet\LibD7
+C:\Archivos de programa\Developer Express Inc\ExpressVerticalGrid\LibD7
+C:\Archivos de programa\Developer Express Inc\XP Theme Manager\LibD7
+C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D7
+C:\Archivos de programa\RemObjects Software\Pascal Script\Source
+C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\DCU\D7
+$(RemObjects SDK)\Dcu\D7
+$(RemObjects SDK)\Source
+$(RemObjects SDK)\Source\CodeGen
+$(RemObjects SDK)\Source\DataSnap
+$(RemObjects SDK)\Source\RODEC
+$(RemObjects SDK)\Source\RODX
+$(RemObjects SDK)\Source\ZLib
+D:\PROYEC~1\COMPON~1\jcl\lib\D7
+D:\PROYEC~1\COMPON~1\jcl\source
+D:\Proyectos\Componentes\AM2000\Lib\D7
+d:\proyectos\componentes\cetools\lib\d7
+d:\proyectos\componentes\fastreport\lib\d7
+D:\Proyectos\Componentes\FthLib\Lib\D7
+D:\Proyectos\Componentes\jvcl\common
+D:\Proyectos\Componentes\jvcl\lib\D7
+d:\proyectos\componentes\pngcomponents\lib\d7
+D:\Proyectos\Componentes\Rodax\Lib\D7
+D:\Proyectos\Componentes\Rx\Dcu\D7
+d:\proyectos\componentes\tms\lib\d7
+
+
+Writing Search Path Registry Entry
+Removing extra characters and blank lines
+Formatting.....
+$(Data Abstract)\DCU\D7
+$(Data Abstract)\Source
+$(Delphi)\Bin
+$(Delphi)\Imports
+$(Delphi)\Lib
+$(Delphi)\Projects\Bpl
+$(Everwood)\Bin
+$(ProgramFiles)\Developer Express Inc
+$(ProgramFiles)\Developer Express Inc\ExpressBars 5\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressCommon Library\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressDataController\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressDBTree Suite\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressEditors Library 5\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressExport Library\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressGDI+ Library\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressLayout Control\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressLibrary\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressMemData\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressNavBar\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressPageControl 2\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressPrinting System\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressQuantumGrid 5\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressQuantumTreeList 4\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressScheduler\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressSpreadSheet\LibD7
+$(ProgramFiles)\Developer Express Inc\ExpressVerticalGrid\LibD7
+$(ProgramFiles)\Developer Express Inc\XP Theme Manager\LibD7
+$(ProgramFiles)\RemObjects Software\Pascal Script\Dcu\D7
+$(ProgramFiles)\RemObjects Software\Pascal Script\Source
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\DCU\D7
+$(RemObjects SDK)\Dcu\D7
+$(RemObjects SDK)\Source
+$(RemObjects SDK)\Source\CodeGen
+$(RemObjects SDK)\Source\DataSnap
+$(RemObjects SDK)\Source\RODEC
+$(RemObjects SDK)\Source\RODX
+$(RemObjects SDK)\Source\ZLib
+D:\PROYEC~1\COMPON~1\jcl\lib\D7
+D:\PROYEC~1\COMPON~1\jcl\source
+D:\Proyectos\Componentes\AM2000\Lib\D7
+d:\proyectos\componentes\cetools\lib\d7
+d:\proyectos\componentes\fastreport\lib\d7
+D:\Proyectos\Componentes\FthLib\Lib\D7
+D:\Proyectos\Componentes\jvcl\common
+D:\Proyectos\Componentes\jvcl\lib\D7
+d:\proyectos\componentes\pngcomponents\lib\d7
+D:\Proyectos\Componentes\Rodax\Lib\D7
+D:\Proyectos\Componentes\Rx\Dcu\D7
+d:\proyectos\componentes\tms\lib\d7
+Writing to Key: Software\Borland\Delphi\7.0\Library Value: Search Path
+Search Path Registry Entry written
+
+Reading Browse Path Registry Entry
+C:\Archivos de programa\Borland\Delphi7\source\clx
+C:\Archivos de programa\Borland\Delphi7\Source\Indy
+C:\Archivos de programa\Borland\Delphi7\source\Internet
+C:\Archivos de programa\Borland\Delphi7\Source\IntraWeb
+C:\Archivos de programa\Borland\Delphi7\Source\Rtl
+C:\Archivos de programa\Borland\Delphi7\source\rtl\common
+C:\Archivos de programa\Borland\Delphi7\source\rtl\Corba45
+C:\Archivos de programa\Borland\Delphi7\source\rtl\Sys
+C:\Archivos de programa\Borland\Delphi7\source\rtl\Win
+C:\Archivos de programa\Borland\Delphi7\Source\Samples
+C:\Archivos de programa\Borland\Delphi7\Source\Soap
+C:\Archivos de programa\Borland\Delphi7\Source\ToolsAPI
+C:\Archivos de programa\Borland\Delphi7\source\vcl
+C:\Archivos de programa\Borland\Delphi7\Source\WebMidas
+C:\Archivos de programa\Borland\Delphi7\source\websnap
+C:\Archivos de programa\Borland\Delphi7\Source\Xml
+C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source
+C:\Archivos de programa\RemObjects Software\Hydra\Source
+C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source
+C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC
+C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX
+D:\PROYEC~1\COMPON~1\jcl\source\common
+D:\PROYEC~1\COMPON~1\jcl\source\vcl
+D:\PROYEC~1\COMPON~1\jcl\source\visclx
+D:\PROYEC~1\COMPON~1\jcl\source\windows
+D:\Proyectos\Componentes\jvcl\common
+D:\Proyectos\Componentes\jvcl\run
+
+
+Writing Browse Path Registry Entry
+Removing extra characters and blank lines
+Formatting.....
+$(Delphi)\source\clx
+$(Delphi)\Source\Indy
+$(Delphi)\source\Internet
+$(Delphi)\Source\IntraWeb
+$(Delphi)\Source\Rtl
+$(Delphi)\source\rtl\common
+$(Delphi)\source\rtl\Corba45
+$(Delphi)\source\rtl\Sys
+$(Delphi)\source\rtl\Win
+$(Delphi)\Source\Samples
+$(Delphi)\Source\Soap
+$(Delphi)\Source\ToolsAPI
+$(Delphi)\source\vcl
+$(Delphi)\Source\WebMidas
+$(Delphi)\source\websnap
+$(Delphi)\Source\Xml
+$(ProgramFiles)\RemObjects Software\Data Abstract for Delphi\Source
+$(ProgramFiles)\RemObjects Software\Hydra\Source
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Source
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC
+$(ProgramFiles)\RemObjects Software\RemObjects SDK for Delphi\Source\RODX
+D:\PROYEC~1\COMPON~1\jcl\source\common
+D:\PROYEC~1\COMPON~1\jcl\source\vcl
+D:\PROYEC~1\COMPON~1\jcl\source\visclx
+D:\PROYEC~1\COMPON~1\jcl\source\windows
+D:\Proyectos\Componentes\jvcl\common
+D:\Proyectos\Componentes\jvcl\run
+Writing to Key: Software\Borland\Delphi\7.0\Library Value: Browsing Path
+Browse Path Registry Entry written
+
+***************************************
+END: Unregistering Component Package
+***************************************
+
+
+***************************************
+BEGIN: Compiling Component Package
+***************************************
+Creating temp compile folder
+Folder Created: C:\DOCUME~1\David\CONFIG~1\Temp\ESetup
+
+Creating DCC32 config file
+Compiling....
+
+Running "C:\ARCHIV~1\Borland\Delphi7\Bin\DCC32.exe" PNG_D7.dpk
+ in D:\PROYEC~1\COMPON~1\PNGCOM~1\Delphi
+Borland Delphi Version 15.0
+Copyright (c) 1983,2002 Borland Software Corporation
+
PNG_D7.dpk(1)
PNG_D7.dpk(29)
PNG_D7.dpk(31)
PNG_D7.dpk(31)
PNG_D7.dpk(31)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(126)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngzlib.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngzlib.pas(149)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngzlib.pas(150)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(126)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pnglang.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pnglang.pas(302)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(135)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(512)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(1024)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(1536)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(2048)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(2560)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(3072)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(3584)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(4096)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(4608)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(5120)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(5263)
+
PNG_D7.dpk(34)
PNG_D7.dpk(34)
PNG_D7.dpk(34)
PNG_D7.dpk(36)
PNG_D7.dpk(37)
+5756 lines, 0.14 seconds, 55284 bytes code, 7413 bytes data.
+
+
+Compiling....
+
+Running "C:\ARCHIV~1\Borland\Delphi7\Bin\DCC32.exe" PngComponentsD7.dpk
+ in D:\PROYEC~1\COMPON~1\PNGCOM~1\Delphi
+Borland Delphi Version 15.0
+Copyright (c) 1983,2002 Borland Software Corporation
+
PngComponentsD7.dpk(1)
PngComponentsD7.dpk(30)
PngComponentsD7.dpk(31)
PngComponentsD7.dpk(32)
PngComponentsD7.dpk(34)
PngComponentsD7.dpk(34)
PngComponentsD7.dpk(34)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8) Fatal: File not found: 'PNG_D7.dcp'
+
+
+Compiling....
+
+Running "C:\ARCHIV~1\Borland\Delphi7\Bin\DCC32.exe" PngComponentsD7D.dpk
+ in D:\PROYEC~1\COMPON~1\PNGCOM~1\Delphi
+Borland Delphi Version 15.0
+Copyright (c) 1983,2002 Borland Software Corporation
+
PngComponentsD7D.dpk(1)
PngComponentsD7D.dpk(31)
PngComponentsD7.dpk(1)
PngComponentsD7.dpk(30)
PngComponentsD7.dpk(31)
PngComponentsD7.dpk(32)
PngComponentsD7.dpk(34)
PngComponentsD7.dpk(34)
PngComponentsD7.dpk(34)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8) Fatal: File not found: 'PNG_D7.dcp'
+
+
+
+Adding Package BPL to Registry
+Adding: $(Delphi)\Projects\Bpl\PNG_D7.bpl
+***************************************
+END: Compiling Component Package
+***************************************
+
diff --git a/internal/1.0 RC3/1/InstallLogD9.txt b/internal/1.0 RC3/1/InstallLogD9.txt
new file mode 100644
index 0000000..7b07721
--- /dev/null
+++ b/internal/1.0 RC3/1/InstallLogD9.txt
@@ -0,0 +1,235 @@
+***************************************
+BEGIN: Unregistering Component Package
+***************************************
+
+Cleaning Known Package Registry Entry
+
+Reading Packages:
+
+Stripping off path and extension
+
+Reading Packages to remove
+PNG_D9
+PngComponentsD9
+PngComponentsD9D
+
+Stripping off path and extension
+PNG_D9
+PngComponentsD9
+PngComponentsD9D
+
+Scanning for previously installed packages....
+Known Package Registry Entry Cleaned
+
+Cleaning Disabled Package Registry Entry
+
+Reading Packages:
+
+Stripping off path and extension
+
+Reading Packages to remove
+PNG_D9
+PngComponentsD9
+PngComponentsD9D
+
+Stripping off path and extension
+PNG_D9
+PngComponentsD9
+PngComponentsD9D
+
+Scanning for previously installed packages....
+Disabled Package Registry Entry Cleaned
+
+Reading Search Path Registry Entry
+C:\Archivos de programa\Borland\BDS\3.0\Imports
+C:\Archivos de programa\Borland\BDS\3.0\lib
+C:\Archivos de programa\Borland\BDS\3.0\Lib\Indy10
+
+
+Writing Search Path Registry Entry
+Removing extra characters and blank lines
+Formatting.....
+$(BDS)\Imports
+$(BDS)\lib
+$(BDS)\Lib\Indy10
+Writing to Key: Software\Borland\BDS\3.0\Library Value: Search Path
+Search Path Registry Entry written
+
+Reading Browse Path Registry Entry
+C:\Archivos de programa\Borland\BDS\3.0\source\Indy10
+C:\Archivos de programa\Borland\BDS\3.0\source\ToolsAPI
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\db
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\Decision Cube
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\IBX
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\Internet
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\Property Editors
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\rtl\common
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\rtl\sys
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\rtl\win
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\soap
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\vcl
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\WebSnap
+C:\Archivos de programa\Borland\BDS\3.0\source\win32\xml
+
+
+Writing Browse Path Registry Entry
+Removing extra characters and blank lines
+Formatting.....
+$(BDS)\source\Indy10
+$(BDS)\source\ToolsAPI
+$(BDS)\source\Win32\db
+$(BDS)\source\Win32\Decision Cube
+$(BDS)\source\Win32\IBX
+$(BDS)\source\Win32\Internet
+$(BDS)\source\Win32\Property Editors
+$(BDS)\source\Win32\rtl\common
+$(BDS)\source\Win32\rtl\sys
+$(BDS)\source\Win32\rtl\win
+$(BDS)\source\Win32\soap
+$(BDS)\source\Win32\vcl
+$(BDS)\source\Win32\WebSnap
+$(BDS)\source\win32\xml
+Writing to Key: Software\Borland\BDS\3.0\Library Value: Browsing Path
+Browse Path Registry Entry written
+
+***************************************
+END: Unregistering Component Package
+***************************************
+
+
+***************************************
+BEGIN: Compiling Component Package
+***************************************
+Creating temp compile folder
+Folder Created: C:\DOCUME~1\David\CONFIG~1\Temp\ESetup
+
+Creating DCC32 config file
+Compiling....
+
+Running "C:\ARCHIV~1\Borland\BDS\3.0\Bin\DCC32.exe" PNG_D9.dpk
+ in D:\PROYEC~1\COMPON~1\PNGCOM~1\Delphi
+Borland Delphi for Win32 compiler version 17.0
+Copyright (c) 1983,2004 Borland Software Corporation
+
PNG_D9.dpk(1)
PNG_D9.dpk(29)
PNG_D9.dpk(31)
PNG_D9.dpk(31)
PNG_D9.dpk(31)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(125)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(126)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngzlib.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngzlib.pas(149)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngzlib.pas(150)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(126)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pnglang.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pnglang.pas(302)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(135)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(512)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(1024)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(1536)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(2048)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(2560)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(3072)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(3584)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(4096)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(4608)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(5120)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\pngimage.pas(5263)
+
PNG_D9.dpk(34)
PNG_D9.dpk(34)
PNG_D9.dpk(34)
PNG_D9.dpk(36)
PNG_D9.dpk(37)
+5756 lines, 0.12 seconds, 55256 bytes code, 7417 bytes data.
+
+
+Compiling....
+
+Running "C:\ARCHIV~1\Borland\BDS\3.0\Bin\DCC32.exe" PngComponentsD9.dpk
+ in D:\PROYEC~1\COMPON~1\PNGCOM~1\Delphi
+Borland Delphi for Win32 compiler version 17.0
+Copyright (c) 1983,2004 Borland Software Corporation
+
PngComponentsD9.dpk(1)
PngComponentsD9.dpk(30)
PngComponentsD9.dpk(31)
PngComponentsD9.dpk(32)
PngComponentsD9.dpk(34)
PngComponentsD9.dpk(34)
PngComponentsD9.dpk(34)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(29)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(11)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(127)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(129)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(270)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(782)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(1294)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngImageList.pas(1352)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(31)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(270)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngFunctions.pas(547)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngButtonFunctions.pas(103)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(11)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngSpeedButton.pas(149)
+
PngComponentsD9.dpk(40)
PngComponentsD9.dpk(40)
PngComponentsD9.dpk(40)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(12)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngBitBtn.pas(263)
+
PngComponentsD9.dpk(40)
PngComponentsD9.dpk(40)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(11)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Source\PngCheckListBox.pas(211)
+
PngComponentsD9.dpk(40)
PngComponentsD9.dpk(42)
PngComponentsD9.dpk(43)
+4127 lines, 1.06 seconds, 27848 bytes code, 165 bytes data.
+
+
+Compiling....
+
+Running "C:\ARCHIV~1\Borland\BDS\3.0\Bin\DCC32.exe" PngComponentsD9D.dpk
+ in D:\PROYEC~1\COMPON~1\PNGCOM~1\Delphi
+Borland Delphi for Win32 compiler version 17.0
+Copyright (c) 1983,2004 Borland Software Corporation
+
PngComponentsD9D.dpk(1)
PngComponentsD9D.dpk(31)
PngComponentsD9D.dpk(33)
PngComponentsD9D.dpk(33)
PngComponentsD9D.dpk(33)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(11)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(1)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Include\Thany.inc(243)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(8)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(9)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(12)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(98)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(270)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(782)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngImageListEditor.pas(1167)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(75)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(270)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentEditors.pas(276)
+
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(10)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(12)
D:\PROYEC~1\COMPON~1\PNGCOM~1\Design\PngComponentsRegister.pas(52)
+
PngComponentsD9D.dpk(36)
PngComponentsD9D.dpk(36)
PngComponentsD9D.dpk(36)
PngComponentsD9D.dpk(38)
PngComponentsD9D.dpk(39)
+2264 lines, 1.06 seconds, 23392 bytes code, 157 bytes data.
+
+
+
+Adding Package BPL to Registry
+Adding: $(BDSPROJECTSDIR)\Bpl\PNG_D9.bpl
+Adding: $(BDSPROJECTSDIR)\Bpl\PngComponentsD9D.bpl
+***************************************
+END: Compiling Component Package
+***************************************
+
+***************************************
+BEGIN: Registering Component Package Paths
+***************************************
+
+Reading Search Path Registry Entry
+Search Path Registry Entry Read...
+C:\Archivos de programa\Borland\BDS\3.0\Imports
+C:\Archivos de programa\Borland\BDS\3.0\lib
+C:\Archivos de programa\Borland\BDS\3.0\Lib\Indy10
+
+Adding Package source path:
+ D:\Proyectos\Componentes\PngComponents\Source
+
+
+Writing Search Path Registry Entry
+Removing extra characters and blank lines
+Formatting.....
+$(BDS)\Imports
+$(BDS)\lib
+$(BDS)\Lib\Indy10
+D:\Proyectos\Componentes\PngComponents\Source
+Writing to Key: Software\Borland\BDS\3.0\Library Value: Search Path
+Search Path Registry Entry written
+
+Reading Browse Path Registry Entry
+Browse Path Registry Entry Read...
+C:\Archivos de programa\Borland\BDS\3.0\source\Indy10
+C:\Archivos de programa\Borland\BDS\3.0\source\ToolsAPI
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\db
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\Decision Cube
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\IBX
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\Internet
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\Property Editors
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\rtl\common
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\rtl\sys
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\rtl\win
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\soap
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\vcl
+C:\Archivos de programa\Borland\BDS\3.0\source\Win32\WebSnap
+C:\Archivos de programa\Borland\BDS\3.0\source\win32\xml
+
+Adding Package source path:
+ D:\Proyectos\Componentes\PngComponents\Source
+
+
+Writing Browse Path Registry Entry
+Removing extra characters and blank lines
+Formatting.....
+$(BDS)\source\Indy10
+$(BDS)\source\ToolsAPI
+$(BDS)\source\Win32\db
+$(BDS)\source\Win32\Decision Cube
+$(BDS)\source\Win32\IBX
+$(BDS)\source\Win32\Internet
+$(BDS)\source\Win32\Property Editors
+$(BDS)\source\Win32\rtl\common
+$(BDS)\source\Win32\rtl\sys
+$(BDS)\source\Win32\rtl\win
+$(BDS)\source\Win32\soap
+$(BDS)\source\Win32\vcl
+$(BDS)\source\Win32\WebSnap
+$(BDS)\source\win32\xml
+D:\Proyectos\Componentes\PngComponents\Source
+Writing to Key: Software\Borland\BDS\3.0\Library Value: Browsing Path
+Browse Path Registry Entry written
+
+***************************************
+END: Registering Component Package Paths
+***************************************
+
diff --git a/internal/1.0 RC3/1/Lib/D10/PNG_D10.dcu b/internal/1.0 RC3/1/Lib/D10/PNG_D10.dcu
new file mode 100644
index 0000000..45a004b
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PNG_D10.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngBitBtn.dcu b/internal/1.0 RC3/1/Lib/D10/PngBitBtn.dcu
new file mode 100644
index 0000000..e6bd4f4
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngBitBtn.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngButtonFunctions.dcu b/internal/1.0 RC3/1/Lib/D10/PngButtonFunctions.dcu
new file mode 100644
index 0000000..0947b58
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngButtonFunctions.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngCheckListBox.dcu b/internal/1.0 RC3/1/Lib/D10/PngCheckListBox.dcu
new file mode 100644
index 0000000..1c8cca5
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngCheckListBox.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngComponentEditors.dcu b/internal/1.0 RC3/1/Lib/D10/PngComponentEditors.dcu
new file mode 100644
index 0000000..4a8e74d
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngComponentEditors.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngComponentsD10.dcu b/internal/1.0 RC3/1/Lib/D10/PngComponentsD10.dcu
new file mode 100644
index 0000000..67f199d
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngComponentsD10.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngComponentsD10D.dcu b/internal/1.0 RC3/1/Lib/D10/PngComponentsD10D.dcu
new file mode 100644
index 0000000..e3fc4dc
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngComponentsD10D.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngComponentsRegister.dcu b/internal/1.0 RC3/1/Lib/D10/PngComponentsRegister.dcu
new file mode 100644
index 0000000..ec06535
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngComponentsRegister.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngFunctions.dcu b/internal/1.0 RC3/1/Lib/D10/PngFunctions.dcu
new file mode 100644
index 0000000..8ac1042
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngFunctions.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngImageList.dcu b/internal/1.0 RC3/1/Lib/D10/PngImageList.dcu
new file mode 100644
index 0000000..bb3c289
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngImageList.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngImageListEditor.dcu b/internal/1.0 RC3/1/Lib/D10/PngImageListEditor.dcu
new file mode 100644
index 0000000..f7c5c92
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngImageListEditor.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/PngSpeedButton.dcu b/internal/1.0 RC3/1/Lib/D10/PngSpeedButton.dcu
new file mode 100644
index 0000000..55f49f3
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/PngSpeedButton.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/pngimage.dcu b/internal/1.0 RC3/1/Lib/D10/pngimage.dcu
new file mode 100644
index 0000000..06919b3
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/pngimage.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/pnglang.dcu b/internal/1.0 RC3/1/Lib/D10/pnglang.dcu
new file mode 100644
index 0000000..d7f792c
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/pnglang.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D10/pngzlib.dcu b/internal/1.0 RC3/1/Lib/D10/pngzlib.dcu
new file mode 100644
index 0000000..7315dbb
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D10/pngzlib.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PNG_D5.bpl b/internal/1.0 RC3/1/Lib/D5/PNG_D5.bpl
new file mode 100644
index 0000000..15760c3
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PNG_D5.bpl differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PNG_D5.dcp b/internal/1.0 RC3/1/Lib/D5/PNG_D5.dcp
new file mode 100644
index 0000000..b85be31
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PNG_D5.dcp differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PNG_D5.dcu b/internal/1.0 RC3/1/Lib/D5/PNG_D5.dcu
new file mode 100644
index 0000000..92c943a
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PNG_D5.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngBitBtn.dcu b/internal/1.0 RC3/1/Lib/D5/PngBitBtn.dcu
new file mode 100644
index 0000000..9c74f2c
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngBitBtn.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngButtonFunctions.dcu b/internal/1.0 RC3/1/Lib/D5/PngButtonFunctions.dcu
new file mode 100644
index 0000000..7db8a7c
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngButtonFunctions.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngCheckListBox.dcu b/internal/1.0 RC3/1/Lib/D5/PngCheckListBox.dcu
new file mode 100644
index 0000000..b9190bc
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngCheckListBox.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentEditors.dcu b/internal/1.0 RC3/1/Lib/D5/PngComponentEditors.dcu
new file mode 100644
index 0000000..b967d3c
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentEditors.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.bpl b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.bpl
new file mode 100644
index 0000000..fa694f3
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.bpl differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.dcp b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.dcp
new file mode 100644
index 0000000..51ea4be
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.dcp differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.dcu b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.dcu
new file mode 100644
index 0000000..a9bba8b
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.bpl b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.bpl
new file mode 100644
index 0000000..c847114
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.bpl differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.dcp b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.dcp
new file mode 100644
index 0000000..f65d557
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.dcp differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.dcu b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.dcu
new file mode 100644
index 0000000..9c3a940
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsD5D.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngComponentsRegister.dcu b/internal/1.0 RC3/1/Lib/D5/PngComponentsRegister.dcu
new file mode 100644
index 0000000..2334ec2
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngComponentsRegister.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngFunctions.dcu b/internal/1.0 RC3/1/Lib/D5/PngFunctions.dcu
new file mode 100644
index 0000000..9fb6ae9
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngFunctions.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngImageList.dcu b/internal/1.0 RC3/1/Lib/D5/PngImageList.dcu
new file mode 100644
index 0000000..344a3a7
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngImageList.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngImageListEditor.dcu b/internal/1.0 RC3/1/Lib/D5/PngImageListEditor.dcu
new file mode 100644
index 0000000..3fd3e69
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngImageListEditor.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/PngSpeedButton.dcu b/internal/1.0 RC3/1/Lib/D5/PngSpeedButton.dcu
new file mode 100644
index 0000000..d0c0adb
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/PngSpeedButton.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/pngimage.dcu b/internal/1.0 RC3/1/Lib/D5/pngimage.dcu
new file mode 100644
index 0000000..4b14d61
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/pngimage.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/pnglang.dcu b/internal/1.0 RC3/1/Lib/D5/pnglang.dcu
new file mode 100644
index 0000000..54d6ab5
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/pnglang.dcu differ
diff --git a/internal/1.0 RC3/1/Lib/D5/pngzlib.dcu b/internal/1.0 RC3/1/Lib/D5/pngzlib.dcu
new file mode 100644
index 0000000..1e0bbbe
Binary files /dev/null and b/internal/1.0 RC3/1/Lib/D5/pngzlib.dcu differ
diff --git a/internal/1.0 RC3/1/MustangpeakComponentInstaller.dll b/internal/1.0 RC3/1/MustangpeakComponentInstaller.dll
new file mode 100644
index 0000000..58e009d
Binary files /dev/null and b/internal/1.0 RC3/1/MustangpeakComponentInstaller.dll differ
diff --git a/internal/1.0 RC3/1/Setup.ini b/internal/1.0 RC3/1/Setup.ini
new file mode 100644
index 0000000..1a3e966
--- /dev/null
+++ b/internal/1.0 RC3/1/Setup.ini
@@ -0,0 +1,47 @@
+[REGKEY]
+Name=Thany\PngComponents
+
+[D4_PACKAGES]
+Package1=
+Package2=
+
+[D5_PACKAGES]
+Package1=PNG_D5
+Package2=PngComponentsD5
+Package3=PngComponentsD5D
+
+[D6_PACKAGES]
+Package1=PNG_D6
+Package2=PngComponentsD6
+Package3=PngComponentsD6D
+
+[D7_PACKAGES]
+Package1=PNG_D7
+Package2=PngComponentsD7
+Package3=PngComponentsD7D
+
+[D8_PACKAGES]
+Package1=
+Package2=
+
+[D9_PACKAGES]
+Package1=PNG_D9
+Package2=PngComponentsD9
+Package3=PngComponentsD9D
+
+[C3_PACKAGES]
+Package1=
+Package2=
+
+[C4_PACKAGES]
+Package1=
+Package2=
+
+[C5_PACKAGES]
+Package1=
+Package2=
+
+[C6_PACKAGES]
+Package1=
+Package2=
+
diff --git a/internal/1.0 RC3/1/Source/PngBitBtn.pas b/internal/1.0 RC3/1/Source/PngBitBtn.pas
new file mode 100644
index 0000000..81d9537
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngBitBtn.pas
@@ -0,0 +1,262 @@
+unit PngBitBtn;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Buttons, Graphics,
+ ImgList, ActnList, PngImageList, PngFunctions, PngButtonFunctions, pngimage
+ {$IFDEF ThemeSupport}, Themes{$ENDIF};
+
+type
+ TPngBitBtn = class(TBitBtn)
+ private
+ FPngImage: TPngObject;
+ FPngOptions: TPngOptions;
+ FCanvas: TCanvas;
+ FLastKind: TBitBtnKind;
+ FImageFromAction: Boolean;
+ {$IFDEF ThemeSupport}
+ FMouseInControl: Boolean;
+ {$ENDIF}
+ IsFocused: Boolean;
+ function PngImageStored: Boolean;
+ procedure SetPngImage(const Value: TPngObject);
+ procedure SetPngOptions(const Value: TPngOptions);
+ procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
+ procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
+ procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
+ protected
+ procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
+ procedure SetButtonStyle(ADefault: Boolean); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property PngImage: TPngObject read FPngImage write SetPngImage stored PngImageStored;
+ property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
+ property Glyph stored False;
+ property NumGlyphs stored False;
+ end;
+
+implementation
+
+{ TPngBitBtn }
+
+constructor TPngBitBtn.Create(AOwner: TComponent);
+begin
+inherited Create(AOwner);
+FPngImage := TPNGObject.Create;
+FPngOptions := [pngBlendOnDisabled];
+FCanvas := TCanvas.Create;
+FLastKind := bkCustom;
+FImageFromAction := False;
+end;
+
+destructor TPngBitBtn.Destroy;
+begin
+FPngImage.Free;
+FCanvas.Free;
+inherited Destroy;
+end;
+
+procedure TPngBitBtn.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+begin
+inherited ActionChange(Sender, CheckDefaults);
+if Sender is TCustomAction
+then with TCustomAction(Sender)
+ do begin
+ //Copy image from action's imagelist
+ if (PngImage.Empty or FImageFromAction) and (ActionList <> nil) and (ActionList.Images <> nil) and (ImageIndex >= 0) and (ImageIndex < ActionList.Images.Count)
+ then begin
+ CopyImageFromImageList(FPngImage, ActionList.Images, ImageIndex);
+ FImageFromAction := True;
+ end;
+ end;
+end;
+
+procedure TPngBitBtn.SetButtonStyle(ADefault: Boolean);
+begin
+inherited SetButtonStyle(ADefault);
+if ADefault <> IsFocused
+then begin
+ IsFocused := ADefault;
+ Refresh;
+ end;
+end;
+
+function TPngBitBtn.PngImageStored: Boolean;
+begin
+Result := not FImageFromAction;
+end;
+
+procedure TPngBitBtn.SetPngImage(const Value: TPngObject);
+begin
+//This is all neccesary, because you can't assign a nil to a TPNGObject
+if Value = nil
+then begin
+ FPngImage.Free;
+ FPngImage := TPNGObject.Create;
+ end
+else FPngImage.Assign(Value);
+
+//To work around the gamma-problem
+with FPngImage
+do if not Empty and (Header.ColorType in [COLOR_RGB, COLOR_RGBALPHA, COLOR_PALETTE])
+ then Chunks.RemoveChunk(Chunks.ItemFromClass(TChunkgAMA));
+
+FImageFromAction := False;
+Repaint;
+end;
+
+procedure TPngBitBtn.SetPngOptions(const Value: TPngOptions);
+begin
+if FPngOptions <> Value
+then begin
+ FPngOptions := Value;
+ Repaint;
+ end;
+end;
+
+procedure TPngBitBtn.CNDrawItem(var Message: TWMDrawItem);
+var
+ R, PaintRect: TRect;
+ GlyphPos, TextPos: TPoint;
+ IsDown, IsDefault: Boolean;
+ Flags: Cardinal;
+ {$IFDEF ThemeSupport}
+ Button: TThemedButton;
+ Details: TThemedElementDetails;
+ {$ENDIF}
+begin
+R := ClientRect;
+FCanvas.Handle := Message.DrawItemStruct^.hDC;
+FCanvas.Font := Self.Font;
+IsDown := Message.DrawItemStruct^.itemState and ODS_SELECTED <> 0;
+IsDefault := Message.DrawItemStruct^.itemState and ODS_FOCUS <> 0;
+
+//Draw the border
+if {$IFDEF ThemeSupport}ThemeServices.ThemesEnabled{$ELSE}False{$ENDIF}
+then begin
+ {$IFDEF ThemeSupport}
+ //Themed border
+ if not Enabled
+ then Button := tbPushButtonDisabled
+ else if IsDown
+ then Button := tbPushButtonPressed
+ else if FMouseInControl
+ then Button := tbPushButtonHot
+ else if IsFocused or IsDefault
+ then Button := tbPushButtonDefaulted
+ else Button := tbPushButtonNormal;
+
+ //Paint the background, border, and finally get the inner rect
+ Details := ThemeServices.GetElementDetails(Button);
+ ThemeServices.DrawParentBackground(Handle, Message.DrawItemStruct.hDC, @Details, True);
+ ThemeServices.DrawElement(Message.DrawItemStruct.hDC, Details, Message.DrawItemStruct.rcItem);
+ R := ThemeServices.ContentRect(FCanvas.Handle, Details, Message.DrawItemStruct.rcItem);
+ {$ENDIF}
+ end
+else begin
+ //Draw the outer border, when focused
+ if IsFocused or IsDefault
+ then begin
+ FCanvas.Pen.Color := clWindowFrame;
+ FCanvas.Pen.Width := 1;
+ FCanvas.Brush.Style := bsClear;
+ FCanvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
+ InflateRect(R, -1, -1);
+ end;
+ //Draw the inner border
+ if IsDown
+ then begin
+ FCanvas.Pen.Color := clBtnShadow;
+ FCanvas.Pen.Width := 1;
+ FCanvas.Brush.Color := clBtnFace;
+ FCanvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
+ InflateRect(R, -1, -1);
+ end
+ else begin
+ Flags := DFCS_BUTTONPUSH or DFCS_ADJUSTRECT;
+ if Message.DrawItemStruct.itemState and ODS_DISABLED <> 0
+ then Flags := Flags or DFCS_INACTIVE;
+ DrawFrameControl(Message.DrawItemStruct.hDC, R, DFC_BUTTON, Flags);
+ end;
+ //Adjust the rect when focused and/or down
+ if IsFocused
+ then begin
+ R := ClientRect;
+ InflateRect(R, -1, -1);
+ end;
+ if IsDown
+ then OffsetRect(R, 1, 1);
+ end;
+
+//Calculate the position of the PNG glyph
+CalcButtonLayout(FCanvas, FPngImage, ClientRect, IsDown, False, Caption, Layout, Margin, Spacing, GlyphPos, TextPos, DrawTextBiDiModeFlags(0));
+
+//Draw the image
+if (FPngImage <> nil) and (Kind = bkCustom) and not FPngImage.Empty
+then begin
+ PaintRect := Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + FPngImage.Width, GlyphPos.Y + FPngImage.Height);
+ if Enabled
+ then DrawPNG(FPngImage, FCanvas, PaintRect, [])
+ else DrawPNG(FPngImage, FCanvas, PaintRect, FPngOptions);
+ end;
+
+//Draw the text
+if Length(Caption) > 0
+then begin
+ PaintRect := Rect(TextPos.X, TextPos.Y, Width, Height);
+ FCanvas.Brush.Style := bsClear;
+ DrawText(FCanvas.Handle, PChar(Caption), -1, PaintRect, DrawTextBiDiModeFlags(0) or DT_TOP or DT_LEFT or DT_SINGLELINE);
+ end;
+
+//Draw the focus rectangle
+if IsFocused and IsDefault
+then begin
+ {$IFDEF ThemeSupport}
+ if not ThemeServices.ThemesEnabled
+ then begin
+ R := ClientRect;
+ InflateRect(R, -3, -3);
+ end;
+ {$ELSE}
+ R := ClientRect;
+ InflateRect(R, -3, -3);
+ {$ENDIF}
+ FCanvas.Pen.Color := clWindowFrame;
+ FCanvas.Brush.Color := clBtnFace;
+ DrawFocusRect(FCanvas.Handle, R);
+ end;
+
+FLastKind := Kind;
+FCanvas.Handle := 0;
+end;
+
+procedure TPngBitBtn.CMMouseEnter(var Message: TMessage);
+begin
+{$IFDEF ThemeSupport}
+inherited;
+if ThemeServices.ThemesEnabled and not FMouseInControl and not (csDesigning in ComponentState)
+then begin
+ FMouseInControl := True;
+ Repaint;
+ end;
+{$ENDIF}
+end;
+
+procedure TPngBitBtn.CMMouseLeave(var Message: TMessage);
+begin
+{$IFDEF ThemeSupport}
+inherited;
+if ThemeServices.ThemesEnabled and FMouseInControl
+then begin
+ FMouseInControl := False;
+ Repaint;
+ end;
+{$ENDIF}
+end;
+
+end.
diff --git a/internal/1.0 RC3/1/Source/PngButtonFunctions.pas b/internal/1.0 RC3/1/Source/PngButtonFunctions.pas
new file mode 100644
index 0000000..2a71e25
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngButtonFunctions.pas
@@ -0,0 +1,102 @@
+unit PngButtonFunctions;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, Buttons, Graphics, Classes, pngimage;
+
+procedure CalcButtonLayout(Canvas: TCanvas; PngImage: TPNGObject; const Client: TRect; Pressed, Down: Boolean; const Caption: string; Layout: TButtonLayout; Margin, Spacing: Integer; var GlyphPos, TextPos: TPoint; BiDiFlags: LongInt);
+
+implementation
+
+procedure CalcButtonLayout(Canvas: TCanvas; PngImage: TPNGObject; const Client: TRect; Pressed, Down: Boolean; const Caption: string; Layout: TButtonLayout; Margin, Spacing: Integer; var GlyphPos, TextPos: TPoint; BiDiFlags: LongInt);
+var
+ ClientSize, GlyphSize, TextSize, TotalSize: TPoint;
+ TextBounds: TRect;
+begin
+if (BiDiFlags and DT_RIGHT) = DT_RIGHT
+then if Layout = blGlyphLeft
+ then Layout := blGlyphRight
+ else if Layout = blGlyphRight
+ then Layout := blGlyphLeft;
+
+//Calculate the item sizes
+ClientSize := Point(Client.Right - Client.Left, Client.Bottom - Client.Top);
+
+if PngImage <> nil
+then GlyphSize := Point(PngImage.Width, PngImage.Height)
+else GlyphSize := Point(0, 0);
+
+if Length(Caption) > 0
+then begin
+ TextBounds := Rect(0, 0, Client.Right - Client.Left, 0);
+ DrawText(Canvas.Handle, PChar(Caption), Length(Caption), TextBounds, DT_CALCRECT or BiDiFlags);
+ TextSize := Point(TextBounds.Right - TextBounds.Left, TextBounds.Bottom - TextBounds.Top);
+ end
+else begin
+ TextBounds := Rect(0, 0, 0, 0);
+ TextSize := Point(0,0);
+ end;
+
+//If the layout has the glyph on the right or the left, then both the
+//text and the glyph are centered vertically. If the glyph is on the top
+//or the bottom, then both the text and the glyph are centered horizontally.
+if Layout in [blGlyphLeft, blGlyphRight]
+then GlyphPos.Y := (ClientSize.Y - GlyphSize.Y + 1) div 2
+else GlyphPos.X := (ClientSize.X - GlyphSize.X + 1) div 2;
+
+//If there is no text or no bitmap, then Spacing is irrelevant
+if (TextSize.X = 0) or (GlyphSize.X = 0)
+then Spacing := 0;
+
+//Adjust Margin and Spacing
+if Margin = -1
+then if Spacing = -1
+ then begin
+ TotalSize := Point(GlyphSize.X + TextSize.X, GlyphSize.Y + TextSize.Y);
+ if Layout in [blGlyphLeft, blGlyphRight]
+ then Margin := (ClientSize.X - TotalSize.X) div 3
+ else Margin := (ClientSize.Y - TotalSize.Y) div 3;
+ end
+ else begin
+ TotalSize := Point(GlyphSize.X + Spacing + TextSize.X, GlyphSize.Y + Spacing + TextSize.Y);
+ if Layout in [blGlyphLeft, blGlyphRight]
+ then Margin := (ClientSize.X - TotalSize.X) div 2
+ else Margin := (ClientSize.Y - TotalSize.Y) div 2;
+ end
+else if Spacing = -1
+ then TotalSize := Point(ClientSize.X - (Margin + GlyphSize.X), ClientSize.Y - (Margin + GlyphSize.Y));
+
+case Layout of
+ blGlyphLeft: GlyphPos.X := Margin;
+ blGlyphRight: GlyphPos.X := ClientSize.X - Margin - GlyphSize.X;
+ blGlyphTop: GlyphPos.Y := Margin;
+ blGlyphBottom: GlyphPos.Y := ClientSize.Y - Margin - GlyphSize.Y;
+ end;
+
+if Layout in [blGlyphLeft, blGlyphRight]
+then TextPos.Y := (ClientSize.Y - TextSize.Y) div 2
+else TextPos.X := (ClientSize.X - TextSize.X) div 2;
+case Layout of
+ blGlyphLeft: TextPos.X := GlyphPos.X + GlyphSize.X + Spacing;
+ blGlyphRight: TextPos.X := GlyphPos.X - Spacing - TextSize.X;
+ blGlyphTop: TextPos.Y := GlyphPos.Y + GlyphSize.Y + Spacing;
+ blGlyphBottom: TextPos.Y := GlyphPos.Y - Spacing - TextSize.Y;
+ end;
+
+//Fixup the result variables
+with GlyphPos
+do begin
+ Inc(X, Client.Left + Integer(Pressed or Down));
+ Inc(Y, Client.Top + Integer(Pressed or Down));
+ end;
+with TextPos
+do begin
+ Inc(X, Client.Left + Integer(Pressed or Down));
+ Inc(Y, Client.Top + Integer(Pressed or Down));
+ end;
+end;
+
+end.
diff --git a/internal/1.0 RC3/1/Source/PngCheckListBox.pas b/internal/1.0 RC3/1/Source/PngCheckListBox.pas
new file mode 100644
index 0000000..86884b3
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngCheckListBox.pas
@@ -0,0 +1,210 @@
+unit PngCheckListBox;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, Messages, Graphics, Controls, Classes, StdCtrls, CheckLst, pngimage,
+ PngFunctions, Math;
+
+type
+ TPngCheckListBox = class(TCheckListBox)
+ private
+ FPngUnchecked: TPNGObject;
+ FPngChecked: TPNGObject;
+ FPngOptions: TPngOptions;
+ FPngGrayed: TPNGObject;
+ procedure SetPngChecked(const Value: TPNGObject);
+ procedure SetPngUnchecked(const Value: TPNGObject);
+ procedure SetPngOptions(const Value: TPngOptions);
+ procedure SetPngGrayed(const Value: TPNGObject);
+ protected
+ procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
+ function GetCheckWidth: Integer; reintroduce;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property PngChecked: TPNGObject read FPngChecked write SetPngChecked;
+ property PngUnchecked: TPNGObject read FPngUnchecked write SetPngUnchecked;
+ property PngGrayed: TPNGObject read FPngGrayed write SetPngGrayed;
+ property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
+ end;
+
+implementation
+
+{ TPngCheckListBox }
+
+constructor TPngCheckListBox.Create(AOwner: TComponent);
+begin
+inherited Create(AOwner);
+FPngChecked := TPNGObject.Create;
+FPngUnchecked := TPNGObject.Create;
+FPngGrayed := TPNGObject.Create;
+end;
+
+destructor TPngCheckListBox.Destroy;
+begin
+FPngChecked.Free;
+FPngUnchecked.Free;
+FPngGrayed.Free;
+inherited Destroy;
+end;
+
+procedure TPngCheckListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState);
+
+ procedure DrawCheck(R: TRect; AState: TCheckBoxState; AEnabled: Boolean);
+ var
+ Png: TPNGObject;
+ OldColor: TColor;
+ begin
+ //Draws the check image, if it's a PNG, otherwise the inherited would have
+ //been called
+ OldColor := Canvas.Brush.Color;
+ Canvas.Brush.Color := Color;
+ Canvas.FillRect(R);
+ Canvas.Brush.Color := OldColor;
+ case AState of
+ cbUnchecked: Png := FPngUnchecked;
+ cbChecked: Png := FPngChecked;
+ else Png := FPngGrayed;
+ end;
+ DrawPNG(Png, Canvas, Classes.Rect(R.Left, R.Top, R.Left + Png.Width, R.Top + Png.Height), FPngOptions);
+ end;
+
+ procedure DrawText;
+ var
+ Flags: Integer;
+ Data: string;
+ begin
+ //Draws the text for an item
+ if Assigned(OnDrawItem)
+ then OnDrawItem(Self, Index, Rect, State)
+ else begin
+ Canvas.FillRect(Rect);
+ if Index < Items.Count
+ then begin
+ Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX);
+ if not UseRightToLeftAlignment
+ then Inc(Rect.Left, 2)
+ else Dec(Rect.Right, 2);
+ Data := '';
+ {$IFDEF THANY_COMPILER_6_UP}
+ if (Style in [lbVirtual, lbVirtualOwnerDraw])
+ then Data := DoGetData(Index)
+ else Data := Items[Index];
+ {$ELSE}
+ Data := Items[Index];
+ {$ENDIF}
+ Windows.DrawText(Canvas.Handle, PChar(Data), Length(Data), Rect, Flags);
+ end;
+ end;
+ end;
+
+var
+ R: TRect;
+ SaveEvent: TDrawItemEvent;
+ ACheckWidth: Integer;
+ Enable: Boolean;
+begin
+if FPngChecked.Empty and FPngUnchecked.Empty and FPngGrayed.Empty
+then inherited DrawItem(Index, Rect, State)
+else begin
+ ACheckWidth := GetCheckWidth;
+ if Index < Items.Count
+ then begin
+ R := Rect;
+ Enable := Self.Enabled and ItemEnabled[Index];
+ if {$IFDEF THANY_COMPILER_6_UP} not Header[Index] {$ELSE} True {$ENDIF}
+ then begin
+ if not UseRightToLeftAlignment
+ then begin
+ R.Right := Rect.Left;
+ R.Left := R.Right - ACheckWidth;
+ end
+ else begin
+ R.Left := Rect.Right;
+ R.Right := R.Left + ACheckWidth;
+ end;
+ DrawCheck(R, Self.State[Index], Enable);
+ end
+ else begin
+ {$IFDEF THANY_COMPILER_6_UP}
+ Canvas.Font.Color := HeaderColor;
+ Canvas.Brush.Color := HeaderBackgroundColor;
+ {$ENDIF}
+ end;
+ if not Enable
+ then Canvas.Font.Color := clGrayText;
+ end;
+
+ if (Style = lbStandard) and Assigned(OnDrawItem)
+ then begin
+ //Force lbStandard list to ignore OnDrawItem event.
+ SaveEvent := OnDrawItem;
+ OnDrawItem := nil;
+ try
+ DrawText;
+ finally
+ OnDrawItem := SaveEvent;
+ end;
+ end
+ else DrawText;
+ end;
+end;
+
+function TPngCheckListBox.GetCheckWidth: Integer;
+begin
+//CheckWidth is equal to the widest PNG
+if not (FPngChecked.Empty and FPngUnchecked.Empty and FPngGrayed.Empty)
+then Result := Max(FPngChecked.Width, Max(FPngUnchecked.Width, FPngGrayed.Width))
+else Result := inherited GetCheckWidth;
+end;
+
+procedure TPngCheckListBox.SetPngChecked(const Value: TPNGObject);
+begin
+//This is all neccesary, because you can't assign a nil to a TPNGObject
+if Value = nil
+then begin
+ FPngChecked.Free;
+ FPngChecked := TPNGObject.Create;
+ end
+else FPngChecked.Assign(Value);
+Repaint;
+end;
+
+procedure TPngCheckListBox.SetPngUnchecked(const Value: TPNGObject);
+begin
+//This is all neccesary, because you can't assign a nil to a TPNGObject
+if Value = nil
+then begin
+ FPngUnchecked.Free;
+ FPngUnchecked := TPNGObject.Create;
+ end
+else FPngUnchecked.Assign(Value);
+Repaint;
+end;
+
+procedure TPngCheckListBox.SetPngGrayed(const Value: TPNGObject);
+begin
+//This is all neccesary, because you can't assign a nil to a TPNGObject
+if Value = nil
+then begin
+ FPngGrayed.Free;
+ FPngGrayed := TPNGObject.Create;
+ end
+else FPngGrayed.Assign(Value);
+Repaint;
+end;
+
+procedure TPngCheckListBox.SetPngOptions(const Value: TPngOptions);
+begin
+if FPngOptions <> Value
+then begin
+ FPngOptions := Value;
+ Repaint;
+ end;
+end;
+
+end.
diff --git a/internal/1.0 RC3/1/Source/PngFunctions.dcu b/internal/1.0 RC3/1/Source/PngFunctions.dcu
new file mode 100644
index 0000000..3ea5425
Binary files /dev/null and b/internal/1.0 RC3/1/Source/PngFunctions.dcu differ
diff --git a/internal/1.0 RC3/1/Source/PngFunctions.pas b/internal/1.0 RC3/1/Source/PngFunctions.pas
new file mode 100644
index 0000000..af9ee3f
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngFunctions.pas
@@ -0,0 +1,546 @@
+unit PngFunctions;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, Graphics, Classes, ImgList, Contnrs, pngimage;
+
+type
+ TPngOption = (pngBlendOnDisabled, pngGrayscaleOnDisabled);
+ TPngOptions = set of TPngOption;
+ TRGBLine = array[Word] of TRGBTriple;
+ PRGBLine = ^TRGBLine;
+ TRGBALine = array[Word] of TRGBQuad;
+ PRGBALine = ^TRGBALine;
+
+procedure MakeImageBlended(Image: TPNGObject; Amount: Byte = 127);
+procedure MakeImageGrayscale(Image: TPNGObject; Amount: Byte = 255);
+procedure DrawPNG(Png: TPNGObject; Canvas: TCanvas; const Rect: TRect; const Options: TPngOptions);
+procedure ConvertToPNG(Source: TGraphic; out Dest: TPNGObject);
+procedure CreatePNG(Color, Mask: TBitmap; out Dest: TPNGObject; InverseMask: Boolean = False);
+procedure CreatePNGMasked(Bitmap: TBitmap; Mask: TColor; out Dest: TPNGObject);
+procedure CopyImageFromImageList(Dest: TPNGObject; ImageList: TCustomImageList; Index: Integer);
+procedure SlicePNG(JoinedPNG: TPNGObject; Columns, Rows: Integer; out SlicedPNGs: TObjectList);
+
+implementation
+
+uses SysUtils, PngImageList;
+
+function ColorToTriple(Color: TColor): TRGBTriple;
+begin
+Color := ColorToRGB(Color);
+Result.rgbtBlue := Color shr 16 and $FF;
+Result.rgbtGreen := Color shr 8 and $FF;
+Result.rgbtRed := Color and $FF;
+end;
+
+procedure MakeImageBlended(Image: TPNGObject; Amount: Byte = 127);
+
+ procedure ForceAlphachannel(BitTransparency: Boolean; TransparentColor: TColor);
+ var
+ Assigner: TBitmap;
+ Temp: TPNGObject;
+ X, Y: Integer;
+ Line: pngimage.PByteArray;
+ Current: TColor;
+ begin
+ //Not all formats of PNG support an alpha-channel (paletted images for example),
+ //so with this function, I simply recreate the PNG as being 32-bits, effectivly
+ //forcing an alpha-channel on it.
+ Temp := TPNGObject.Create;
+ try
+ Assigner := TBitmap.Create;
+ try
+ Assigner.Width := Image.Width;
+ Assigner.Height := Image.Height;
+ Temp.Assign(Assigner);
+ finally
+ Assigner.Free;
+ end;
+ Temp.CreateAlpha;
+ for Y := 0 to Image.Height - 1
+ do begin
+ Line := Temp.AlphaScanline[Y];
+ for X := 0 to Image.Width - 1
+ do begin
+ Current := Image.Pixels[X, Y];
+ Temp.Pixels[X, Y] := Current;
+ if BitTransparency and (Current = TransparentColor)
+ then Line^[X] := 0
+ else Line^[X] := Amount;
+ end;
+ end;
+ Image.Assign(Temp);
+ finally
+ Temp.Free;
+ end;
+ end;
+
+var
+ X, Y: Integer;
+ Line: pngimage.PByteArray;
+ Forced: Boolean;
+ TransparentColor: TColor;
+ BitTransparency: Boolean;
+begin
+//If the PNG is doesn't have an alpha channel, then add one
+BitTransparency := Image.TransparencyMode = ptmBit;
+TransparentColor := Image.TransparentColor;
+if not (Image.Header.ColorType in [COLOR_RGBALPHA, COLOR_GRAYSCALEALPHA])
+then begin
+ Forced := Image.Header.ColorType in [COLOR_GRAYSCALE, COLOR_PALETTE];
+ if Forced
+ then ForceAlphachannel(BitTransparency, TransparentColor)
+ else Image.CreateAlpha;
+ end
+else Forced := False;
+
+//Divide the alpha values by 2
+if not Forced and (Image.Header.ColorType in [COLOR_RGBALPHA, COLOR_GRAYSCALEALPHA])
+then for Y := 0 to Image.Height - 1
+ do begin
+ Line := Image.AlphaScanline[Y];
+ for X := 0 to Image.Width - 1
+ do if BitTransparency and (Image.Pixels[X, Y] = TransparentColor)
+ then Line^[X] := 0
+ else Line^[X] := Round(Line^[X] / 256 * (Amount + 1));
+ end;
+end;
+
+procedure MakeImageGrayscale(Image: TPNGObject; Amount: Byte = 255);
+
+ procedure GrayscaleRGB(var R, G, B: Byte);
+ var
+ X: Byte;
+ begin
+ X := Round(R * 0.30 + G * 0.59 + B * 0.11);
+ R := Round(R / 256 * (256 - Amount - 1)) + Round(X / 256 * (Amount + 1));
+ G := Round(G / 256 * (256 - Amount - 1)) + Round(X / 256 * (Amount + 1));
+ B := Round(B / 256 * (256 - Amount - 1)) + Round(X / 256 * (Amount + 1));
+ end;
+
+var
+ X, Y, PalCount: Integer;
+ Line: Pointer;
+ PaletteHandle: HPalette;
+ Palette: array[Byte] of TPaletteEntry;
+begin
+//Don't do anything if the image is already a grayscaled one
+if not (Image.Header.ColorType in [COLOR_GRAYSCALE, COLOR_GRAYSCALEALPHA])
+then begin
+ if Image.Header.ColorType = COLOR_PALETTE
+ then begin
+ //Grayscale every palette entry
+ PaletteHandle := Image.Palette;
+ PalCount := GetPaletteEntries(PaletteHandle, 0, 256, Palette);
+ for X := 0 to PalCount - 1
+ do GrayscaleRGB(Palette[X].peRed, Palette[X].peGreen, Palette[X].peBlue);
+ SetPaletteEntries(PaletteHandle, 0, PalCount, Palette);
+ Image.Palette := PaletteHandle;
+ end
+ else begin
+ //Grayscale every pixel
+ for Y := 0 to Image.Height - 1
+ do begin
+ Line := Image.Scanline[Y];
+ for X := 0 to Image.Width - 1
+ do GrayscaleRGB(PRGBLine(Line)^[X].rgbtRed, PRGBLine(Line)^[X].rgbtGreen, PRGBLine(Line)^[X].rgbtBlue);
+ end;
+ end;
+ end;
+end;
+
+procedure DrawPNG(Png: TPNGObject; Canvas: TCanvas; const Rect: TRect; const Options: TPngOptions);
+var
+ PngCopy: TPNGObject;
+begin
+if Options <> []
+then begin
+ PngCopy := TPNGObject.Create;
+ try
+ PngCopy.Assign(Png);
+ if pngBlendOnDisabled in Options
+ then MakeImageBlended(PngCopy);
+ if pngGrayscaleOnDisabled in Options
+ then MakeImageGrayscale(PngCopy);
+ PngCopy.Draw(Canvas, Rect);
+ finally
+ PngCopy.Free;
+ end;
+ end
+else Png.Draw(Canvas, Rect);
+end;
+
+procedure ConvertToPNG(Source: TGraphic; out Dest: TPNGObject);
+var
+ MaskLines: array of pngimage.PByteArray;
+
+ function CompareColors(const Color1: TRGBTriple; const Color2: TColor): Boolean;
+ begin
+ Result := (Color1.rgbtBlue = Color2 shr 16 and $FF) and
+ (Color1.rgbtGreen = Color2 shr 8 and $FF) and
+ (Color1.rgbtRed = Color2 and $FF);
+ end;
+
+ function ColorToTriple(const Color: TColor): TRGBTriple;
+ begin
+ Result.rgbtBlue := Color shr 16 and $FF;
+ Result.rgbtGreen := Color shr 8 and $FF;
+ Result.rgbtRed := Color and $FF;
+ end;
+
+ procedure GetAlphaMask(SourceColor: TBitmap);
+ type
+ TBitmapInfo = packed record
+ bmiHeader: TBitmapV4Header; //Otherwise I may not get per-pixel alpha values.
+ bmiColors: array[0..0] of TRGBQuad;
+ end;
+ var
+ Bits: PRGBALine;
+ BitmapInfo: TBitmapInfo;
+ I, X, Y: Integer;
+ HasAlpha: Boolean;
+ begin
+ Bits := AllocMem(4 * SourceColor.Width * SourceColor.Height);
+ try
+ ZeroMemory(Bits, 4 * SourceColor.Width * SourceColor.Height);
+ ZeroMemory(@BitmapInfo, SizeOf(BitmapInfo));
+ BitmapInfo.bmiHeader.bV4Size := SizeOf(BitmapInfo.bmiHeader);
+ BitmapInfo.bmiHeader.bV4Width := SourceColor.Width;
+ BitmapInfo.bmiHeader.bV4Height := -SourceColor.Height; //Otherwise the image is upside down.
+ BitmapInfo.bmiHeader.bV4Planes := 1;
+ BitmapInfo.bmiHeader.bV4BitCount := 32;
+ BitmapInfo.bmiHeader.bV4V4Compression := BI_BITFIELDS;
+ BitmapInfo.bmiHeader.bV4SizeImage := 4 * SourceColor.Width * SourceColor.Height;
+
+ if GetDIBits(SourceColor.Canvas.Handle, SourceColor.Handle, 0, SourceColor.Height, Bits, Windows.PBitmapInfo(@BitmapInfo)^, DIB_RGB_COLORS) > 0
+ then begin
+ //Because Win32 API is a piece of crap when it comes to icons, I have to check
+ //whether an has an alpha-channel the hard way.
+ I := 0;
+ HasAlpha := False;
+ for Y := 0 to SourceColor.Height - 1
+ do for X := 0 to SourceColor.Width - 1
+ do begin
+ if Bits^[I].rgbReserved <> 0
+ then HasAlpha := True;
+ Inc(I);
+ end;
+ if HasAlpha
+ then begin
+ //OK, so not all alpha-values are 0, which indicates the existence of an
+ //alpha-channel.
+ I := 0;
+ for Y := 0 to SourceColor.Height - 1
+ do for X := 0 to SourceColor.Width - 1
+ do begin
+ MaskLines[Y]^[X] := Bits^[I].rgbReserved;
+ Inc(I);
+ end;
+ end;
+ end;
+ finally
+ FreeMem(Bits, 4 * SourceColor.Width * SourceColor.Height);
+ end;
+ end;
+
+ function WinXPOrHigher: Boolean;
+ var
+ Info: TOSVersionInfo;
+ begin
+ Info.dwOSVersionInfoSize := SizeOf(Info);
+ GetVersionEx(Info);
+ Result := (Info.dwPlatformId = VER_PLATFORM_WIN32_NT) and ((Info.dwMajorVersion > 5) or ((Info.dwMajorVersion = 5) and (Info.dwMinorVersion >= 1)));
+ end;
+
+var
+ Temp, SourceColor, SourceMask: TBitmap;
+ X, Y: Integer;
+ Line: PRGBLine;
+ MaskLine, AlphaLine: pngimage.PByteArray;
+ TransparentColor, CurrentColor: TColor;
+ IconInfo: TIconInfo;
+ AlphaNeeded: Boolean;
+begin
+//A PNG does not have to be converted
+if Source is TPNGObject
+then begin
+ Dest := TPNGObject.Create;
+ Dest.Assign(Source);
+ Exit;
+ end;
+
+AlphaNeeded := False;
+Temp := TBitmap.Create;
+SetLength(MaskLines, Source.Height);
+for Y := 0 to Source.Height - 1
+do begin
+ MaskLines[Y] := AllocMem(Source.Width);
+ FillMemory(MaskLines[Y], Source.Width, 255);
+ end;
+try
+ //Initialize intermediate color bitmap
+ Temp.Width := Source.Width;
+ Temp.Height := Source.Height;
+ Temp.PixelFormat := pf24bit;
+
+ //Now figure out the transparency
+ if Source is TBitmap
+ then if Source.Transparent
+ then begin
+ //TBitmap is just about comparing the drawn colors against the TransparentColor
+ if TBitmap(Source).TransparentMode = tmFixed
+ then TransparentColor := TBitmap(Source).TransparentColor
+ else TransparentColor := TBitmap(Source).Canvas.Pixels[0, Source.Height - 1];
+ for Y := 0 to Temp.Height - 1
+ do begin
+ Line := Temp.ScanLine[Y];
+ MaskLine := MaskLines[Y];
+ for X := 0 to Temp.Width - 1
+ do begin
+ CurrentColor := GetPixel(TBitmap(Source).Canvas.Handle, X, Y);
+ if CurrentColor = TransparentColor
+ then begin
+ MaskLine^[X] := 0;
+ AlphaNeeded := True;
+ end;
+ Line^[X] := ColorToTriple(CurrentColor);
+ end;
+ end;
+ end
+ else Temp.Canvas.Draw(0, 0, Source)
+ else if Source is TIcon
+ then begin
+ //TIcon is more complicated, because there are bitmasked (classic) icons and
+ //alphablended (modern) icons. Not to forget about the "inverse" color.
+ GetIconInfo(TIcon(Source).Handle, IconInfo);
+ SourceColor := TBitmap.Create;
+ SourceMask := TBitmap.Create;
+ try
+ SourceColor.Handle := IconInfo.hbmColor;
+ SourceMask.Handle := IconInfo.hbmMask;
+ Temp.Canvas.Draw(0, 0, SourceColor);
+ for Y := 0 to Temp.Height - 1
+ do begin
+ MaskLine := MaskLines[Y];
+ for X := 0 to Temp.Width - 1
+ do if GetPixel(SourceMask.Canvas.Handle, X, Y) <> 0
+ then begin
+ MaskLine^[X] := 0;
+ AlphaNeeded := True;
+ end;
+ end;
+ if (GetDeviceCaps(SourceColor.Canvas.Handle, BITSPIXEL) = 32) and WinXPOrHigher
+ then begin
+ //This doesn't neccesarily mean we actually have 32bpp in the icon, because the
+ //bpp of an icon is always the same as the display settings, regardless of the
+ //actual color depth of the icon :(
+ AlphaNeeded := True;
+ GetAlphaMask(SourceColor);
+ end;
+ //This still doesn't work for alphablended icons...
+ finally
+ SourceColor.Free;
+ SourceMask.Free
+ end;
+ end;
+
+ //And finally, create the destination PNG image
+ Dest := TPNGObject.Create;
+ Dest.Assign(Temp);
+ if AlphaNeeded
+ then begin
+ Dest.CreateAlpha;
+ for Y := 0 to Dest.Height - 1
+ do begin
+ AlphaLine := Dest.AlphaScanline[Y];
+ CopyMemory(AlphaLine, MaskLines[Y], Temp.Width);
+ end;
+ end;
+
+finally
+ for Y := 0 to Source.Height - 1
+ do FreeMem(MaskLines[Y], Source.Width);
+ Temp.Free;
+ end;
+end;
+
+procedure CreatePNG(Color, Mask: TBitmap; out Dest: TPNGObject; InverseMask: Boolean = False);
+var
+ Temp: TBitmap;
+ Line: pngimage.PByteArray;
+ X, Y: Integer;
+begin
+//Create a PNG from two separate color and mask bitmaps. InverseMask should be
+//True if white means transparent, and black means opaque.
+Dest := TPNGObject.Create;
+if not (Color.PixelFormat in [pf24bit, pf32bit])
+then begin
+ Temp := TBitmap.Create;
+ try
+ Temp.Assign(Color);
+ Temp.PixelFormat := pf24bit;
+ Dest.Assign(Temp);
+ finally
+ Temp.Free;
+ end;
+ end
+else Dest.Assign(Color);
+
+//Copy the alpha channel.
+Dest.CreateAlpha;
+for Y := 0 to Dest.Height - 1
+do begin
+ Line := Dest.AlphaScanline[Y];
+ for X := 0 to Dest.Width - 1
+ do if InverseMask
+ then Line^[X] := 255 - (GetPixel(Mask.Canvas.Handle, X, Y) and $FF)
+ else Line^[X] := GetPixel(Mask.Canvas.Handle, X, Y) and $FF;
+ end;
+end;
+
+procedure CreatePNGMasked(Bitmap: TBitmap; Mask: TColor; out Dest: TPNGObject);
+var
+ Temp: TBitmap;
+ Line: pngimage.PByteArray;
+ X, Y: Integer;
+begin
+//Create a PNG from two separate color and mask bitmaps. InverseMask should be
+//True if white means transparent, and black means opaque.
+Dest := TPNGObject.Create;
+if not (Bitmap.PixelFormat in [pf24bit, pf32bit])
+then begin
+ Temp := TBitmap.Create;
+ try
+ Temp.Assign(Bitmap);
+ Temp.PixelFormat := pf24bit;
+ Dest.Assign(Temp);
+ finally
+ Temp.Free;
+ end;
+ end
+else Dest.Assign(Bitmap);
+
+//Copy the alpha channel.
+Dest.CreateAlpha;
+for Y := 0 to Dest.Height - 1
+do begin
+ Line := Dest.AlphaScanline[Y];
+ for X := 0 to Dest.Width - 1
+ do Line^[X] := Integer(TColor(GetPixel(Bitmap.Canvas.Handle, X, Y)) <> Mask) * $FF;
+ end;
+end;
+
+procedure CopyImageFromImageList(Dest: TPNGObject; ImageList: TCustomImageList; Index: Integer);
+var
+ Icon: TIcon;
+ IconInfo: TIconInfo;
+ ColorBitmap, MaskBitmap: TBitmap;
+ X, Y: Integer;
+ AlphaLine: pngimage.PByteArray;
+ Png: TPngImageCollectionItem;
+begin
+if ImageList is TPngImageList
+then begin
+ //This is easy, just copy the PNG object from the imagelist to the PNG object
+ //from the button
+ Png := TPNGImageList(ImageList).PngImages[Index];
+ if Png <> nil
+ then Dest.Assign(Png.PngImage);
+ end
+else begin
+ Icon := TIcon.Create;
+ ColorBitmap := TBitmap.Create;
+ MaskBitmap := TBitmap.Create;
+ try
+ //Try to copy an icon to a PNG object, including transparency
+ ImageList.GetIcon(Index, Icon);
+ if GetIconInfo(Icon.Handle, IconInfo)
+ then begin
+ //First, pump the colors into the PNG object
+ ColorBitmap.Handle := IconInfo.hbmColor;
+ ColorBitmap.PixelFormat := pf24bit;
+ Dest.Assign(ColorBitmap);
+
+ //Finally, copy the transparency
+ Dest.CreateAlpha;
+ MaskBitmap.Handle := IconInfo.hbmMask;
+ for Y := 0 to Dest.Height - 1
+ do begin
+ AlphaLine := Dest.AlphaScanline[Y];
+ for X := 0 to Dest.Width - 1
+ do AlphaLine^[X] := Integer(GetPixel(MaskBitmap.Canvas.Handle, X, Y) = COLORREF(clBlack)) * 255;
+ end;
+ end;
+ finally
+ MaskBitmap.Free;
+ ColorBitmap.Free;
+ Icon.Free;
+ end;
+ end;
+end;
+
+procedure SlicePNG(JoinedPNG: TPNGObject; Columns, Rows: Integer; out SlicedPNGs: TObjectList);
+var
+ X, Y, ImageX, ImageY, OffsetX, OffsetY: Integer;
+ Width, Height: Integer;
+ Bitmap: TBitmap;
+ BitmapLine: PRGBLine;
+ AlphaLineA, AlphaLineB: pngimage.PByteArray;
+ PNG: TPNGObject;
+begin
+//This function slices a large PNG file (e.g. an image with all images for a
+//toolbar) into smaller, equally-sized pictures.
+SlicedPNGs := TObjectList.Create(False);
+Width := JoinedPNG.Width div Columns;
+Height := JoinedPNG.Height div Rows;
+
+//Loop through the columns and rows to create each individual image
+for ImageY := 0 to Rows - 1
+do begin
+ for ImageX := 0 to Columns - 1
+ do begin
+ OffsetX := ImageX * Width;
+ OffsetY := ImageY * Height;
+ Bitmap := TBitmap.Create;
+ try
+ Bitmap.Width := Width;
+ Bitmap.Height := Height;
+ Bitmap.PixelFormat := pf24bit;
+
+ //Copy the color information into a temporary bitmap. We can't use TPNGObject.Draw
+ //here, because that would combine the color and alpha values.
+ for Y := 0 to Bitmap.Height - 1
+ do begin
+ BitmapLine := Bitmap.Scanline[Y];
+ for X := 0 to Bitmap.Width - 1
+ do BitmapLine^[X] := ColorToTriple(JoinedPNG.Pixels[X + OffsetX, Y + OffsetY]);
+ end;
+
+ PNG := TPNGObject.Create;
+ PNG.Assign(Bitmap);
+
+ if JoinedPNG.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA]
+ then begin
+ //Copy the alpha channel
+ PNG.CreateAlpha;
+ for Y := 0 to PNG.Height - 1
+ do begin
+ AlphaLineA := JoinedPNG.AlphaScanline[Y + OffsetY];
+ AlphaLineB := JoinedPNG.AlphaScanline[Y];
+ for X := 0 to PNG.Width - 1
+ do AlphaLineB^[X] := AlphaLineA^[X + OffsetX];
+ end;
+ end;
+
+ SlicedPNGs.Add(PNG);
+ finally
+ Bitmap.Free;
+ end;
+ end;
+ end;
+end;
+
+end.
diff --git a/internal/1.0 RC3/1/Source/PngImage.dcu b/internal/1.0 RC3/1/Source/PngImage.dcu
new file mode 100644
index 0000000..27696fc
Binary files /dev/null and b/internal/1.0 RC3/1/Source/PngImage.dcu differ
diff --git a/internal/1.0 RC3/1/Source/PngImageList.dcu b/internal/1.0 RC3/1/Source/PngImageList.dcu
new file mode 100644
index 0000000..cbe4a6b
Binary files /dev/null and b/internal/1.0 RC3/1/Source/PngImageList.dcu differ
diff --git a/internal/1.0 RC3/1/Source/PngImageList.pas b/internal/1.0 RC3/1/Source/PngImageList.pas
new file mode 100644
index 0000000..a363243
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngImageList.pas
@@ -0,0 +1,1351 @@
+unit PngImageList;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, Classes, SysUtils, Controls, Graphics, CommCtrl, ImgList, PngImage,
+ PngFunctions, ComCtrls;
+
+type
+ TPngImageCollection = class;
+ TPngImageCollectionItem = class;
+ TPngImageCollectionItems = class;
+
+ TPngImageList = class(TImageList)
+ private
+ FPngImages: TPngImageCollectionItems;
+ FEnabledImages: Boolean;
+ FPngOptions: TPngOptions;
+ FLocked: Integer;
+ procedure SetPngOptions(const Value: TPngOptions);
+ {$IFNDEF THANY_COMPILER_7_UP}
+ procedure ReadLeft(Reader: TReader);
+ procedure ReadTop(Reader: TReader);
+ procedure WriteLeft(Writer: TWriter);
+ procedure WriteTop(Writer: TWriter);
+ {$ENDIF}
+ procedure SetWidth(const Value: Integer);
+ procedure SetHeight(const Value: Integer);
+ function GetWidth: Integer;
+ function GetHeight: Integer;
+ protected
+ procedure SetEnabledImages(const Value: Boolean); virtual;
+ procedure SetPngImages(const Value: TPngImageCollectionItems); virtual;
+ procedure AssignTo(Dest: TPersistent); override;
+ function PngToIcon(const Png: TPNGObject; Background: TColor = clNone): HICON;
+ procedure CopyPngs; virtual;
+ procedure DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; Style: Cardinal; Enabled: Boolean = True); override;
+ {$IFDEF THANY_COMPILER_7_UP}
+ procedure ReadData(Stream: TStream); override;
+ procedure WriteData(Stream: TStream); override;
+ {$ELSE}
+ procedure DefineProperties(Filer: TFiler); override;
+ {$ENDIF}
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure BeginUpdate;
+ procedure EndUpdate(Update: Boolean = True);
+ procedure InsertPng(Index: Integer; const Png: TPNGObject; Background: TColor = clNone);
+ //Patched methods
+ function Add(Image, Mask: TBitmap): Integer; virtual;
+ function AddIcon(Image: TIcon): Integer; virtual;
+ {$IFDEF THANY_COMPILER_7_UP}
+ function AddImage(Value: TCustomImageList; Index: Integer): Integer; virtual;
+ {$ENDIF}
+ procedure AddImages(Value: TCustomImageList); virtual;
+ function AddMasked(Image: TBitmap; MaskColor: TColor): Integer; virtual;
+ procedure Clear; virtual;
+ procedure Delete(Index: Integer); virtual;
+ procedure Insert(Index: Integer; Image, Mask: TBitmap); virtual;
+ procedure InsertIcon(Index: Integer; Image: TIcon); virtual;
+ procedure InsertMasked(Index: Integer; Image: TBitmap; MaskColor: TColor); virtual;
+ procedure Move(CurIndex, NewIndex: Integer); virtual;
+ procedure Replace(Index: Integer; Image, Mask: TBitmap); virtual;
+ procedure ReplaceIcon(Index: Integer; Image: TIcon); virtual;
+ procedure ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor); virtual;
+ published
+ property EnabledImages: Boolean read FEnabledImages write SetEnabledImages default True;
+ property PngImages: TPngImageCollectionItems read FPngImages write SetPngImages;
+ property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
+ property Width read GetWidth write SetWidth default 16;
+ property Height read GetHeight write SetHeight default 16;
+ end;
+
+ TPngImageCollection = class(TComponent)
+ private
+ FItems: TPngImageCollectionItems;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property Items: TPngImageCollectionItems read FItems write FItems;
+ end;
+
+ TPngImageCollectionItems = class(TCollection)
+ private
+ FOwner: TPersistent;
+ function GetItem(Index: Integer): TPngImageCollectionItem;
+ procedure SetItem(Index: Integer; const Value: TPngImageCollectionItem);
+ protected
+ procedure Update(Item: TCollectionItem); override;
+ function GetOwner: TPersistent; override;
+ public
+ constructor Create(AOwner: TPersistent);
+ property Items[index: Integer]: TPngImageCollectionItem read GetItem write SetItem; default;
+ function Add(DontCreatePNG: Boolean = False): TPngImageCollectionItem; reintroduce;
+ function Insert(Index: Integer; DontCreatePNG: Boolean = False): TPngImageCollectionItem; reintroduce;
+ procedure Assign(Source: TPersistent); override;
+ end;
+
+ TPngImageCollectionItem = class(TCollectionItem)
+ private
+ FPngImage: TPNGObject;
+ FName: string;
+ FBackground: TColor;
+ procedure SetPngImage(const Value: TPNGObject);
+ procedure SetBackground(const Value: TColor);
+ protected
+ procedure AssignTo(Dest: TPersistent); override;
+ function GetDisplayName: string; override;
+ public
+ constructor Create(Collection: TCollection); overload; override;
+ constructor Create(Collection: TCollection; DontCreatePNG: Boolean = False); reintroduce; overload;
+ destructor Destroy; override;
+ procedure Assign(Source: TPersistent); override;
+ function Duplicate: TPNGObject;
+ published
+ property PngImage: TPNGObject read FPngImage write SetPngImage;
+ property Name: string read FName write FName;
+ property Background: TColor read FBackground write SetBackground default clBtnFace;
+ end;
+
+implementation
+
+uses Math, Contnrs;
+
+var
+ ImageListCount: Integer = 0;
+ MethodPatches: TObjectList = nil;
+
+type
+ TMethodPatch = class
+ OldPointer, NewPointer: Pointer;
+ OldBody: array[0..5] of Byte;
+ Name: string;
+ constructor Create;
+ destructor Destroy; override;
+ function PatchBack: Boolean;
+ procedure BeginInvokeOldMethod;
+ procedure FinishInvokeOldMethod;
+ end;
+
+{ Global }
+
+function FindMethodPatch(const Name: string): TMethodPatch;
+var
+ I: Integer;
+begin
+Result := nil;
+for I := 0 to MethodPatches.Count - 1
+do if TMethodPatch(MethodPatches[I]).Name = Name
+ then begin
+ Result := TMethodPatch(MethodPatches[I]);
+ Break;
+ end;
+end;
+
+function PatchPtr(OldPtr, NewPtr: Pointer; const Name: string; Patch: TMethodPatch): Boolean;
+var
+ Access: Cardinal;
+begin
+Result := False;
+Patch.Name := Name;
+if OldPtr <> NewPtr
+then with Patch
+ do begin
+ OldPointer := OldPtr;
+ NewPointer := NewPtr;
+ Move(PByte(OldPtr)^, OldBody[0], SizeOf(OldBody));
+ if VirtualProtect(OldPtr, 16, PAGE_READWRITE, @Access)
+ then begin
+ PByte(OldPtr)^ := $E9; // Near jump
+ PCardinal(Cardinal(OldPtr)+ 1)^ := Cardinal(NewPtr)- Cardinal(OldPtr)- 5;
+ VirtualProtect(OldPtr, 16, Access, @Access);
+ Result := True;
+ end;
+ end;
+if not Result
+then Patch.OldPointer := nil;
+end;
+
+procedure ApplyMethodPatches;
+type
+ TPointerCombo = record
+ OldPtr, NewPtr: Pointer;
+ Name: string;
+ end;
+
+ function Combo(OldPtr, NewPtr: Pointer; const Name: string): TPointerCombo;
+ begin
+ Result.OldPtr := OldPtr;
+ Result.NewPtr := NewPtr;
+ Result.Name := Name;
+ end;
+
+const
+ EmptyCombo: TPointerCombo = (OldPtr: nil; NewPtr: nil; Name: '');
+var
+ Pointers: array of TPointerCombo;
+ Patch: TMethodPatch;
+ I: Integer;
+begin
+if ImageListCount = 0
+then begin
+ SetLength(Pointers, 14);
+ Pointers[0] := Combo(@TCustomImageList.Add, @TPngImageList.Add, 'Add');
+ Pointers[1] := Combo(@TCustomImageList.AddIcon, @TPngImageList.AddIcon, 'AddIcon');
+ {$IFDEF THANY_COMPILER_7_UP}
+ Pointers[2] := Combo(@TCustomImageList.AddImage, @TPngImageList.AddImage, 'AddImage');
+ {$ELSE}
+ Pointers[2] := EmptyCombo;
+ {$ENDIF}
+ Pointers[3] := Combo(@TCustomImageList.AddImages, @TPngImageList.AddImages, 'AddImages');
+ Pointers[4] := Combo(@TCustomImageList.AddMasked, @TPngImageList.AddMasked, 'AddMasked');
+ Pointers[5] := Combo(@TCustomImageList.Clear, @TPngImageList.Clear, 'Clear');
+ Pointers[6] := Combo(@TCustomImageList.Delete, @TPngImageList.Delete, 'Delete');
+ Pointers[7] := Combo(@TCustomImageList.Insert, @TPngImageList.Insert, 'Insert');
+ Pointers[8] := Combo(@TCustomImageList.InsertIcon, @TPngImageList.InsertIcon, 'InsertIcon');
+ Pointers[9] := Combo(@TCustomImageList.InsertMasked, @TPngImageList.InsertMasked, 'InsertMasked');
+ Pointers[10] := Combo(@TCustomImageList.Move, @TPngImageList.Move, 'Move');
+ Pointers[11] := Combo(@TCustomImageList.Replace, @TPngImageList.Replace, 'Replace');
+ Pointers[12] := Combo(@TCustomImageList.ReplaceIcon, @TPngImageList.ReplaceIcon, 'ReplaceIcon');
+ Pointers[13] := Combo(@TCustomImageList.ReplaceMasked, @TPngImageList.ReplaceMasked, 'ReplaceMasked');
+
+ MethodPatches := TObjectList.Create;
+ for I := Low(Pointers) to High(Pointers)
+ do if Pointers[I].OldPtr <> nil
+ then begin
+ Patch := TMethodPatch.Create;
+ if PatchPtr(Pointers[I].OldPtr, Pointers[I].NewPtr, Pointers[I].Name, Patch)
+ then MethodPatches.Add(Patch)
+ else Patch.Free;
+ end;
+ end;
+end;
+
+procedure RevertPatchedMethods;
+begin
+if ImageListCount = 0
+then FreeAndNil(MethodPatches);
+end;
+
+{ TMethodPatch }
+
+constructor TMethodPatch.Create;
+begin
+inherited Create;
+OldPointer := nil;
+end;
+
+destructor TMethodPatch.Destroy;
+begin
+if OldPointer <> nil
+then PatchBack;
+inherited Destroy;
+end;
+
+function TMethodPatch.PatchBack: Boolean;
+var
+ Access: Cardinal;
+begin
+Result := False;
+if VirtualProtect(OldPointer, 16, PAGE_READWRITE, @Access)
+then begin
+ Move(OldBody[0], OldPointer^, SizeOf(OldBody));
+ VirtualProtect(OldPointer, 16, Access, @Access);
+ Result := True;
+ end;
+end;
+
+procedure TMethodPatch.BeginInvokeOldMethod;
+begin
+PatchBack;
+end;
+
+procedure TMethodPatch.FinishInvokeOldMethod;
+begin
+PatchPtr(OldPointer, NewPointer, Name, Self);
+end;
+
+{ TPngImageList }
+
+procedure TPngImageList.AssignTo(Dest: TPersistent);
+begin
+inherited AssignTo(Dest);
+if Dest is TPngImageList
+then begin
+ TPngImageList(Dest).PngImages := FPngImages;
+ TPngImageList(Dest).EnabledImages := FEnabledImages;
+ end;
+end;
+
+function TPngImageList.PngToIcon(const Png: TPNGObject; Background: TColor = clNone): HICON;
+const
+ MaxRGBQuads = MaxInt div SizeOf(TRGBQuad) - 1;
+type
+ TRGBQuadArray = array[0..MaxRGBQuads] of TRGBQuad;
+ PRGBQuadArray = ^TRGBQuadArray;
+ TBitmapInfo4 = packed record
+ bmiHeader: TBitmapV4Header;
+ bmiColors: array[0..0] of TRGBQuad;
+ end;
+
+ function PngToIcon32(Png: TPNGObject): HIcon;
+ var
+ ImageBits: PRGBQuadArray;
+ BitmapInfo: TBitmapInfo4;
+ IconInfo: TIconInfo;
+ AlphaBitmap: HBitmap;
+ MaskBitmap: TBitmap;
+ X, Y: Integer;
+ AlphaLine: PByteArray;
+ HasAlpha, HasBitmask: Boolean;
+ Color, TransparencyColor: TColor;
+ begin
+ //Convert a PNG object to an alpha-blended icon resource
+ ImageBits := nil;
+
+ //Allocate a DIB for the color data and alpha channel
+ with BitmapInfo.bmiHeader
+ do begin
+ bV4Size := SizeOf(BitmapInfo.bmiHeader);
+ bV4Width := Png.Width;
+ bV4Height := Png.Height;
+ bV4Planes := 1;
+ bV4BitCount := 32;
+ bV4V4Compression := BI_BITFIELDS;
+ bV4SizeImage := 0;
+ bV4XPelsPerMeter := 0;
+ bV4YPelsPerMeter := 0;
+ bV4ClrUsed := 0;
+ bV4ClrImportant := 0;
+ bV4RedMask := $00FF0000;
+ bV4GreenMask := $0000FF00;
+ bV4BlueMask := $000000FF;
+ bV4AlphaMask := $FF000000;
+ end;
+ AlphaBitmap := CreateDIBSection(0, PBitmapInfo(@BitmapInfo)^, DIB_RGB_COLORS, Pointer(ImageBits), 0, 0);
+ try
+ //Spin through and fill it with a wash of color and alpha.
+ AlphaLine := nil;
+ HasAlpha := Png.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA];
+ HasBitmask := Png.TransparencyMode = ptmBit;
+ TransparencyColor := Png.TransparentColor;
+ for Y := 0 to Png.Height - 1
+ do begin
+ if HasAlpha
+ then AlphaLine := Png.AlphaScanline[Png.Height - Y - 1];
+ for X := 0 to Png.Width - 1
+ do begin
+ Color := Png.Pixels[X, Png.Height - Y - 1];
+ ImageBits^[Y * Png.Width + X].rgbRed := Color and $FF;
+ ImageBits^[Y * Png.Width + X].rgbGreen := Color shr 8 and $FF;
+ ImageBits^[Y * Png.Width + X].rgbBlue := Color shr 16 and $FF;
+ if HasAlpha
+ then ImageBits^[Y * Png.Width + X].rgbReserved := AlphaLine^[X]
+ else if HasBitmask
+ then ImageBits^[Y * Png.Width + X].rgbReserved := Integer(Color <> TransparencyColor) * 255;
+ end;
+ end;
+
+ //Create an empty mask
+ MaskBitmap := TBitmap.Create;
+ try
+ MaskBitmap.Width := Png.Width;
+ MaskBitmap.Height := Png.Height;
+ MaskBitmap.PixelFormat := pf1bit;
+ MaskBitmap.Canvas.Brush.Color := clBlack;
+ MaskBitmap.Canvas.FillRect(Rect(0, 0, MaskBitmap.Width, MaskBitmap.Height));
+
+ //Create the alpha blended icon
+ IconInfo.fIcon := True;
+ IconInfo.hbmColor := AlphaBitmap;
+ IconInfo.hbmMask := MaskBitmap.Handle;
+ Result := CreateIconIndirect(IconInfo);
+ finally
+ MaskBitmap.Free;
+ end;
+ finally
+ DeleteObject(AlphaBitmap);
+ end;
+ end;
+
+ function PngToIcon24(Png: TPNGObject; Background: TColor): HIcon;
+ var
+ ColorBitmap, MaskBitmap: TBitmap;
+ X, Y: Integer;
+ AlphaLine: PByteArray;
+ IconInfo: TIconInfo;
+ TransparencyColor: TColor;
+ begin
+ ColorBitmap := TBitmap.Create;
+ MaskBitmap := TBitmap.Create;
+ try
+ ColorBitmap.Width := Png.Width;
+ ColorBitmap.Height := Png.Height;
+ ColorBitmap.PixelFormat := pf32bit;
+ MaskBitmap.Width := Png.Width;
+ MaskBitmap.Height := Png.Height;
+ MaskBitmap.PixelFormat := pf32bit;
+
+ //Draw the color bitmap
+ ColorBitmap.Canvas.Brush.Color := Background;
+ ColorBitmap.Canvas.FillRect(Rect(0, 0, Png.Width, Png.Height));
+ Png.Draw(ColorBitmap.Canvas, Rect(0, 0, Png.Width, Png.Height));
+
+ //Create the mask bitmap
+ if Png.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA]
+ then for Y := 0 to Png.Height - 1
+ do begin
+ AlphaLine := Png.AlphaScanline[Y];
+ for X := 0 to Png.Width - 1
+ do if AlphaLine^[X] = 0
+ then SetPixelV(MaskBitmap.Canvas.Handle, X, Y, clWhite)
+ else SetPixelV(MaskBitmap.Canvas.Handle, X, Y, clBlack);
+ end
+ else if Png.TransparencyMode = ptmBit
+ then begin
+ TransparencyColor := Png.TransparentColor;
+ for Y := 0 to Png.Height - 1
+ do for X := 0 to Png.Width - 1
+ do if Png.Pixels[X, Y] = TransparencyColor
+ then SetPixelV(MaskBitmap.Canvas.Handle, X, Y, clWhite)
+ else SetPixelV(MaskBitmap.Canvas.Handle, X, Y, clBlack);
+ end;
+
+ //Create the icon
+ IconInfo.fIcon := True;
+ IconInfo.hbmColor := ColorBitmap.Handle;
+ IconInfo.hbmMask := MaskBitmap.Handle;
+ Result := CreateIconIndirect(IconInfo);
+ finally
+ ColorBitmap.Free;
+ MaskBitmap.Free;
+ end;
+ end;
+
+begin
+if {$IFDEF THANY_COMPILER_7_UP}
+ GetComCtlVersion >= ComCtlVersionIE6
+ {$ELSE} False {$ENDIF} then
+ //Windows XP or later, using the modern method: convert every PNG to
+ //an icon resource with alpha channel
+ Result := PngToIcon32(Png)
+else
+ //No Windows XP, using the legacy method: copy every PNG to a normal
+ //bitmap using a fixed background color
+ Result := PngToIcon24(Png, Background);
+end;
+
+procedure TPngImageList.CopyPngs;
+var
+ I: Integer;
+ Png: TPNGObject;
+ Icon: HIcon;
+begin
+//Are we adding a bunch of images?
+if FLocked > 0
+then Exit;
+
+//Copy PNG images to the imagelist. These images will not be stored in the DFM.
+ImageList_Remove(Handle, -1);
+Handle := ImageList_Create(Width, Height, ILC_COLOR32 or (Integer(Masked) * ILC_MASK), 0, AllocBy);
+
+if not FEnabledImages and (FPngOptions <> [])
+then Png := TPNGObject.Create
+else Png := nil; //<- To prevent a compiler warning
+try
+ for I := 0 to FPngImages.Count - 1
+ do begin
+ if TPngImageCollectionItem(FPngImages.Items[I]).PngImage = nil
+ then Continue;
+ if FEnabledImages or (FPngOptions = [])
+ then Icon := PngToIcon(FPngImages.Items[I].PngImage, FPngImages.Items[I].Background)
+ else begin
+ //Basically the same as in the DrawPNG function
+ Png.Assign(TPngImageCollectionItem(FPngImages.Items[I]).PngImage);
+ if pngBlendOnDisabled in FPngOptions
+ then MakeImageBlended(Png);
+ if pngGrayscaleOnDisabled in FPngOptions
+ then MakeImageGrayscale(Png);
+ Icon := PngToIcon(Png);
+ end;
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ end;
+finally
+ if not FEnabledImages and (FPngOptions <> [])
+ then Png.Free;
+ end;
+end;
+
+constructor TPngImageList.Create(AOwner: TComponent);
+begin
+inherited Create(AOwner);
+if ImageListCount = 0
+then ApplyMethodPatches;
+Inc(ImageListCount);
+FEnabledImages := True;
+FPngOptions := [pngBlendOnDisabled];
+FPngImages := TPngImageCollectionItems.Create(Self);
+FLocked := 0;
+end;
+
+destructor TPngImageList.Destroy;
+begin
+FPngImages.Free;
+Dec(ImageListCount);
+if ImageListCount = 0
+then RevertPatchedMethods;
+inherited Destroy;
+end;
+
+procedure TPngImageList.BeginUpdate;
+begin
+Inc(FLocked);
+end;
+
+procedure TPngImageList.EndUpdate(Update: Boolean);
+begin
+Dec(FLocked);
+if Update and (FLocked = 0)
+then CopyPngs;
+end;
+
+procedure TPngImageList.InsertPng(Index: Integer; const Png: TPNGObject; Background: TColor);
+var
+ I: Integer;
+ Icon: HICON;
+ TempList: TCustomImageList;
+begin
+TempList := TCustomImageList.Create(nil);
+try
+ TempList.Assign(Self);
+ ImageList_RemoveAll(Handle);
+ for I := 0 to Index - 1
+ do begin
+ Icon := ImageList_GetIcon(TempList.Handle, I, ILD_NORMAL);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ end;
+ Icon := PngToIcon(Png, Background);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ for I := Index to TempList.Count - 1
+ do begin
+ Icon := ImageList_GetIcon(TempList.Handle, I, ILD_NORMAL);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ end;
+finally
+ TempList.Free;
+ end;
+end;
+
+//--- Patched methods ---
+
+function TPngImageList.Add(Image, Mask: TBitmap): Integer;
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then if Image = nil
+ then Result := -1
+ else begin
+ BeginUpdate;
+ try
+ Item := FPngImages.Add(True);
+ CreatePNG(Image, Mask, Item.FPngImage);
+ Result := Item.Index;
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ Change;
+ finally
+ EndUpdate;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('Add');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ Result := TCustomImageList(Self).Add(Image, Mask);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end
+ else Result := -1;
+ end;
+end;
+
+function TPngImageList.AddIcon(Image: TIcon): Integer;
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then if Image = nil
+ then Result := -1
+ else begin
+ BeginUpdate;
+ try
+ Item := FPngImages.Add(True);
+ ConvertToPNG(Image, Item.FPngImage);
+ Result := Item.Index;
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ Change;
+ finally
+ EndUpdate;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('AddIcon');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ Result := TCustomImageList(Self).AddIcon(Image);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end
+ else Result := -1;
+ end;
+end;
+
+{$IFDEF THANY_COMPILER_7_UP}
+function TPngImageList.AddImage(Value: TCustomImageList; Index: Integer): Integer;
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Add a new PNG based on the image from another imagelist. If this happens to be
+ //a PngImageList, the PNG object is simply copied.
+ BeginUpdate;
+ try
+ Item := FPngImages.Add(False);
+ CopyImageFromImageList(Item.FPngImage, Value, Index);
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ Result := Item.Index;
+ Change;
+ finally
+ EndUpdate;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('AddImage');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ Result := TCustomImageList(Self).AddImage(Value, Index);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end
+ else Result := -1;
+ end;
+end;
+{$ENDIF}
+
+procedure TPngImageList.AddImages(Value: TCustomImageList);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ I: Integer;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ BeginUpdate;
+ try
+ //Copy every image from Value into this imagelist.
+ for I := 0 to Value.Count - 1
+ do begin
+ Item := FPngImages.Add(False);
+ CopyImageFromImageList(Item.FPngImage, Value, I);
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ end;
+ Change;
+ finally
+ EndUpdate;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('AddImages');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).AddImages(Value);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+function TPngImageList.AddMasked(Image: TBitmap; MaskColor: TColor): Integer;
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then if Image = nil
+ then Result := -1
+ else begin
+ BeginUpdate;
+ try
+ //Add a new PNG based on the image and a colored mask.
+ Item := FPngImages.Add(True);
+ CreatePNGMasked(Image, MaskColor, Item.FPngImage);
+ Result := Item.Index;
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_AddIcon(Handle, Icon);
+ DestroyIcon(Icon);
+ Change;
+ finally
+ EndUpdate;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('AddMasked');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ Result := TCustomImageList(Self).AddMasked(Image, MaskColor);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end
+ else Result := -1;
+ end;
+end;
+
+procedure TPngImageList.Clear;
+var
+ Patch: TMethodPatch;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Clear the PngImages collection and the internal imagelist.
+ BeginUpdate;
+ try
+ FPngImages.Clear;
+ ImageList_Remove(Handle, -1);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('Clear');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).Clear;
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.Delete(Index: Integer);
+var
+ Patch: TMethodPatch;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Delete an image from the PngImages collection and from the internal imagelist.
+ if (Index >= 0) and (Index < Count)
+ then begin
+ BeginUpdate;
+ try
+ FPngImages.Delete(Index);
+ ImageList_Remove(Handle, Index);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('Delete');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).Delete(Index);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.Insert(Index: Integer; Image, Mask: TBitmap);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Insert a new PNG based on the image and its mask.
+ if Image <> nil
+ then begin
+ BeginUpdate;
+ try
+ Item := FPngImages.Insert(Index, True);
+ CreatePNG(Image, Mask, Item.FPngImage);
+ InsertPng(Index, Item.PngImage, Item.Background);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('Insert');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).Insert(Index, Image, Mask);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.InsertIcon(Index: Integer; Image: TIcon);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Insert a new PNG based on the image.
+ if Image <> nil
+ then begin
+ BeginUpdate;
+ try
+ Item := FPngImages.Insert(Index, True);
+ ConvertToPNG(Image, Item.FPngImage);
+ InsertPng(Index, Item.PngImage, Item.Background);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('InsertIcon');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).InsertIcon(Index, Image);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.InsertMasked(Index: Integer; Image: TBitmap; MaskColor: TColor);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Insert a new PNG based on the image and a colored mask.
+ if Image <> nil
+ then begin
+ BeginUpdate;
+ try
+ Item := FPngImages.Insert(Index, True);
+ CreatePNGMasked(Image, MaskColor, Item.FPngImage);
+ InsertPng(Index, Item.PngImage, Item.Background);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('InsertMasked');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).InsertMasked(Index, Image, MaskColor);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.Move(CurIndex, NewIndex: Integer);
+var
+ Patch: TMethodPatch;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Move an image from one position to another. Don't try doing so in the internal
+ //imagelist, just recreate it, since this method won't be called very often.
+ BeginUpdate;
+ try
+ ImageList_Remove(Handle, CurIndex);
+ InsertPng(NewIndex, FPngImages[CurIndex].PngImage, FPngImages[CurIndex].Background);
+ FPngImages[CurIndex].Index := NewIndex;
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('Move');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).Move(CurIndex, NewIndex);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.Replace(Index: Integer; Image, Mask: TBitmap);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Replace an existing PNG based with a new image and its mask.
+ if Image <> nil
+ then begin
+ BeginUpdate;
+ try
+ Item := FPngImages[Index];
+ Item.FPngImage.Free;
+ CreatePNG(Image, Mask, Item.FPngImage);
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_ReplaceIcon(Handle, Index, Icon);
+ DestroyIcon(Icon);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end;
+ end
+else begin
+ Patch := FindMethodPatch('Replace');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).Replace(Index, Image, Mask);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.ReplaceIcon(Index: Integer; Image: TIcon);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Replace an existing PNG based with a new image.
+ if Image <> nil
+ then begin
+ BeginUpdate;
+ try
+ Item := FPngImages[Index];
+ Item.FPngImage.Free;
+ ConvertToPNG(Image, Item.FPngImage);
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_ReplaceIcon(Handle, Index, Icon);
+ DestroyIcon(Icon);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end
+ end
+else begin
+ Patch := FindMethodPatch('ReplaceIcon');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).ReplaceIcon(Index, Image);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+procedure TPngImageList.ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor);
+var
+ Item: TPngImageCollectionItem;
+ Patch: TMethodPatch;
+ Icon: HICON;
+begin
+if TObject(Self) is TPngImageList
+then begin
+ //Replace an existing PNG based with a new image and a colored mask.
+ if NewImage <> nil
+ then begin
+ BeginUpdate;
+ try
+ Item := FPngImages[Index];
+ Item.FPngImage.Free;
+ CreatePNGMasked(NewImage, MaskColor, Item.FPngImage);
+ Icon := PngToIcon(Item.PngImage, Item.Background);
+ ImageList_ReplaceIcon(Handle, Index, Icon);
+ DestroyIcon(Icon);
+ Change;
+ finally
+ EndUpdate(False);
+ end;
+ end
+ end
+else begin
+ Patch := FindMethodPatch('ReplaceMasked');
+ if Patch <> nil
+ then begin
+ Patch.BeginInvokeOldMethod;
+ try
+ TCustomImageList(Self).ReplaceMasked(Index, NewImage, MaskColor);
+ finally
+ Patch.FinishInvokeOldMethod;
+ end;
+ end;
+ end;
+end;
+
+//--- End of patched methods ---
+
+procedure TPngImageList.DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; Style: Cardinal; Enabled: Boolean);
+var
+ PaintRect: TRect;
+ Options: TPngOptions;
+ Png: TPngImageCollectionItem;
+begin
+//Draw a PNG directly to the Canvas. This is the preferred method to call,
+//because this omits the API calls that use a fixed background.
+PaintRect := Rect(X, Y, X + Width, Y + Height);
+if Enabled
+then Options := []
+else Options := FPngOptions;
+Png := TPngImageCollectionItem(FPngImages.Items[Index]);
+if Png <> nil
+then DrawPNG(Png.PngImage, Canvas, PaintRect, Options);
+end;
+
+procedure TPngImageList.SetPngImages(const Value: TPngImageCollectionItems);
+begin
+if FPngImages <> Value
+then begin
+ FPngImages.Assign(Value);
+ Change;
+ end;
+end;
+
+{$IFDEF THANY_COMPILER_7_UP}
+
+procedure TPngImageList.ReadData(Stream: TStream);
+begin
+//Make sure nothing gets read from the DFM
+end;
+
+procedure TPngImageList.WriteData(Stream: TStream);
+begin
+//Make sure nothing gets written to the DFM
+end;
+
+{$ELSE}
+
+procedure TPngImageList.DefineProperties(Filer: TFiler);
+var
+ Ancestor: TComponent;
+ Info: Longint;
+begin
+//Omit defining the bitmap data, and implement the standard properties for
+//TComponent
+Info := 0;
+Ancestor := TComponent(Filer.Ancestor);
+if Ancestor <> nil
+then Info := Ancestor.DesignInfo;
+Filer.DefineProperty('Left', ReadLeft, WriteLeft, LongRec(DesignInfo).Lo <> LongRec(Info).Lo);
+Filer.DefineProperty('Top', ReadTop, WriteTop, LongRec(DesignInfo).Hi <> LongRec(Info).Hi);
+end;
+
+{$ENDIF}
+
+procedure TPngImageList.SetEnabledImages(const Value: Boolean);
+begin
+if FEnabledImages xor Value
+then begin
+ FEnabledImages := Value;
+ CopyPngs;
+ end;
+end;
+
+procedure TPngImageList.SetPngOptions(const Value: TPngOptions);
+begin
+if FPngOptions <> Value
+then begin
+ FPngOptions := Value;
+ CopyPngs;
+ end;
+end;
+
+{$IFNDEF THANY_COMPILER_7_UP}
+
+procedure TPngImageList.ReadLeft(Reader: TReader);
+var
+ FDesignInfo: Longint;
+begin
+FDesignInfo := DesignInfo;
+LongRec(FDesignInfo).Lo := Reader.ReadInteger;
+DesignInfo := FDesignInfo;
+end;
+
+procedure TPngImageList.ReadTop(Reader: TReader);
+var
+ FDesignInfo: Longint;
+begin
+FDesignInfo := DesignInfo;
+LongRec(FDesignInfo).Hi := Reader.ReadInteger;
+DesignInfo := FDesignInfo;
+end;
+
+procedure TPngImageList.WriteLeft(Writer: TWriter);
+begin
+Writer.WriteInteger(LongRec(DesignInfo).Lo);
+end;
+
+procedure TPngImageList.WriteTop(Writer: TWriter);
+begin
+Writer.WriteInteger(LongRec(DesignInfo).Hi);
+end;
+
+{$ENDIF}
+
+function TPngImageList.GetHeight: Integer;
+begin
+Result := inherited Height;
+end;
+
+function TPngImageList.GetWidth: Integer;
+begin
+Result := inherited Width;
+end;
+
+procedure TPngImageList.SetHeight(const Value: Integer);
+begin
+if inherited Height <> Value
+then begin
+ inherited Height := Value;
+ Clear;
+ end;
+end;
+
+procedure TPngImageList.SetWidth(const Value: Integer);
+begin
+if inherited Width <> Value
+then begin
+ inherited Width := Value;
+ Clear;
+ end;
+end;
+
+{ TPngImageCollection }
+
+constructor TPngImageCollection.Create(AOwner: TComponent);
+begin
+inherited Create(AOwner);
+FItems := TPngImageCollectionItems.Create(Self);
+end;
+
+destructor TPngImageCollection.Destroy;
+begin
+FItems.Free;
+inherited Destroy;
+end;
+
+{ TPngImageCollectionItems }
+
+constructor TPngImageCollectionItems.Create(AOwner: TPersistent);
+begin
+inherited Create(TPngImageCollectionItem);
+FOwner := AOwner;
+end;
+
+function TPngImageCollectionItems.Add(DontCreatePNG: Boolean = False): TPngImageCollectionItem;
+begin
+{$IFDEF THANY_COMPILER_6_UP}{$WARN SYMBOL_DEPRECATED OFF}{$ENDIF}
+Result := TPngImageCollectionItem.Create(Self, DontCreatePNG);
+{$IFDEF THANY_COMPILER_6_UP}Added(TCollectionItem(Result));{$ENDIF}
+end;
+
+function TPngImageCollectionItems.Insert(Index: Integer; DontCreatePNG: Boolean = False): TPngImageCollectionItem;
+begin
+Result := Add(DontCreatePNG);
+Result.Index := Index;
+end;
+
+procedure TPngImageCollectionItems.Assign(Source: TPersistent);
+begin
+inherited Assign(Source);
+Update(nil);
+end;
+
+function TPngImageCollectionItems.GetOwner: TPersistent;
+begin
+Result := FOwner;
+end;
+
+procedure TPngImageCollectionItems.Update(Item: TCollectionItem);
+begin
+inherited Update(Item);
+if FOwner is TPngImageList
+then TPngImageList(FOwner).CopyPngs;
+end;
+
+function TPngImageCollectionItems.GetItem(Index: Integer): TPngImageCollectionItem;
+begin
+if (Index >= 0) and (Index < Count)
+then Result := TPngImageCollectionItem(inherited Items[Index])
+else Result := nil;
+end;
+
+procedure TPngImageCollectionItems.SetItem(Index: Integer; const Value: TPngImageCollectionItem);
+begin
+if (Index >= 0) and (Index < Count)
+then inherited Items[Index] := Value;
+end;
+
+{ TPngImageCollectionItem }
+
+procedure TPngImageCollectionItem.AssignTo(Dest: TPersistent);
+begin
+inherited AssignTo(Dest);
+if (Dest is TPngImageCollectionItem)
+then TPngImageCollectionItem(Dest).PngImage := PngImage;
+end;
+
+constructor TPngImageCollectionItem.Create(Collection: TCollection);
+begin
+inherited Create(Collection);
+FPngImage := TPNGObject.Create;
+FName := Format('PngImage%d', [Index]);
+FBackground := clBtnFace;
+end;
+
+constructor TPngImageCollectionItem.Create(Collection: TCollection; DontCreatePNG: Boolean = False);
+begin
+inherited Create(Collection);
+if DontCreatePng
+then FPngImage := nil
+else FPngImage := TPNGObject.Create;
+FName := Format('PngImage%d', [Index]);
+FBackground := clBtnFace;
+end;
+
+destructor TPngImageCollectionItem.Destroy;
+begin
+FPngImage.Free;
+inherited Destroy;
+end;
+
+procedure TPngImageCollectionItem.Assign(Source: TPersistent);
+begin
+if Source is TPngImageCollectionItem
+then begin
+ PngImage.Assign(TPngImageCollectionItem(Source).PngImage);
+ Background := TPngImageCollectionItem(Source).Background;
+ Name := TPngImageCollectionItem(Source).Name;
+ end
+else inherited Assign(Source);
+end;
+
+function TPngImageCollectionItem.Duplicate: TPNGObject;
+begin
+Result := TPNGObject.Create;
+Result.Assign(FPngImage);
+end;
+
+function TPngImageCollectionItem.GetDisplayName: string;
+begin
+if Length(FName) = 0
+then Result := inherited GetDisplayName
+else Result := FName;
+end;
+
+procedure TPngImageCollectionItem.SetPngImage(const Value: TPNGObject);
+begin
+FPngImage.Assign(Value);
+Changed(False);
+end;
+
+procedure TPngImageCollectionItem.SetBackground(const Value: TColor);
+begin
+if FBackground <> Value
+then begin
+ FBackground := Value;
+ Changed(False);
+ end;
+end;
+
+initialization
+
+finalization
+ MethodPatches.Free;
+
+end.
diff --git a/internal/1.0 RC3/1/Source/PngSpeedButton.pas b/internal/1.0 RC3/1/Source/PngSpeedButton.pas
new file mode 100644
index 0000000..be4ecf8
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngSpeedButton.pas
@@ -0,0 +1,148 @@
+unit PngSpeedButton;
+
+{$I ..\Include\Thany.inc}
+
+interface
+
+uses
+ Windows, SysUtils, Classes, Controls, Buttons, Graphics, ActnList,
+ PngFunctions, PngButtonFunctions, pngimage;
+
+type
+ TPngSpeedButton = class(TSpeedButton)
+ private
+ FPngImage: TPngObject;
+ FPngOptions: TPngOptions;
+ FImageFromAction: Boolean;
+ function PngImageStored: Boolean;
+ procedure SetPngImage(const Value: TPngObject);
+ procedure SetPngOptions(const Value: TPngOptions);
+ procedure CreatePngGlyph;
+ protected
+ procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
+ procedure Paint; override;
+ procedure Loaded; override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property PngImage: TPngObject read FPngImage write SetPngImage stored PngImageStored;
+ property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
+ property Glyph stored False;
+ property NumGlyphs stored False;
+ end;
+
+implementation
+
+{ TPngSpeedButton }
+
+constructor TPngSpeedButton.Create(AOwner: TComponent);
+begin
+inherited Create(AOwner);
+FPngImage := TPNGObject.Create;
+FPngOptions := [pngBlendOnDisabled];
+FImageFromAction := False;
+end;
+
+destructor TPngSpeedButton.Destroy;
+begin
+FPngImage.Free;
+inherited Destroy;
+end;
+
+procedure TPngSpeedButton.ActionChange(Sender: TObject; CheckDefaults: Boolean);
+begin
+inherited ActionChange(Sender, CheckDefaults);
+if Sender is TCustomAction
+then with TCustomAction(Sender)
+ do begin
+ //Copy image from action's imagelist
+ if (PngImage.Empty or FImageFromAction) and (ActionList <> nil) and (ActionList.Images <> nil) and (ImageIndex >= 0) and (ImageIndex < ActionList.Images.Count)
+ then begin
+ CopyImageFromImageList(FPngImage, ActionList.Images, ImageIndex);
+ CreatePngGlyph;
+ FImageFromAction := True;
+ end;
+ end;
+end;
+
+procedure TPngSpeedButton.Paint;
+var
+ PaintRect: TRect;
+ GlyphPos, TextPos: TPoint;
+begin
+inherited Paint;
+
+if FPngImage <> nil
+then begin
+ //Calculate the position of the PNG glyph
+ CalcButtonLayout(Canvas, FPngImage, ClientRect, FState = bsDown, Down, Caption, Layout, Margin, Spacing, GlyphPos, TextPos, DrawTextBiDiModeFlags(0));
+ PaintRect := Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + FPngImage.Width, GlyphPos.Y + FPngImage.Height);
+
+ if Enabled
+ then DrawPNG(FPngImage, Canvas, PaintRect, [])
+ else DrawPNG(FPngImage, Canvas, PaintRect, FPngOptions);
+ end;
+end;
+
+procedure TPngSpeedButton.Loaded;
+begin
+inherited Loaded;
+CreatePngGlyph;
+end;
+
+function TPngSpeedButton.PngImageStored: Boolean;
+begin
+Result := not FImageFromAction;
+end;
+
+procedure TPngSpeedButton.SetPngImage(const Value: TPngObject);
+begin
+//This is all neccesary, because you can't assign a nil to a TPNGObject
+if Value = nil
+then begin
+ FPngImage.Free;
+ FPngImage := TPNGObject.Create;
+ end
+else FPngImage.Assign(Value);
+
+//To work around the gamma-problem
+with FPngImage
+do if Header.ColorType in [COLOR_RGB, COLOR_RGBALPHA, COLOR_PALETTE]
+ then Chunks.RemoveChunk(Chunks.ItemFromClass(TChunkgAMA));
+
+FImageFromAction := False;
+CreatePngGlyph;
+Repaint;
+end;
+
+procedure TPngSpeedButton.SetPngOptions(const Value: TPngOptions);
+begin
+if FPngOptions <> Value
+then begin
+ FPngOptions := Value;
+ CreatePngGlyph;
+ Repaint;
+ end;
+end;
+
+procedure TPngSpeedButton.CreatePngGlyph;
+var
+ Bmp: TBitmap;
+begin
+//Create an empty glyph, just to align the text correctly
+Bmp := TBitmap.Create;
+try
+ Bmp.Width := FPngImage.Width;
+ Bmp.Height := FPngImage.Height;
+ Bmp.Canvas.Brush.Color := clBtnFace;
+ Bmp.Canvas.FillRect(Rect(0, 0, Bmp.Width, Bmp.Height));
+ Glyph.Assign(Bmp);
+ NumGlyphs := 1;
+finally
+ Bmp.Free;
+ end;
+end;
+
+
+end.
diff --git a/internal/1.0 RC3/1/Source/PngTBXOfficeXPTheme.pas b/internal/1.0 RC3/1/Source/PngTBXOfficeXPTheme.pas
new file mode 100644
index 0000000..f79cd4b
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/PngTBXOfficeXPTheme.pas
@@ -0,0 +1,277 @@
+{***********************************************************}
+{ PngTBXOfficeXPTheme }
+{ A PNG-aware version of the TBX OfficeXP theme }
+{ }
+{ Copyright (c) 2004 Martijn Saly }
+{***********************************************************}
+
+unit PngTBXOfficeXPTheme;
+
+interface
+
+uses
+ Windows, Graphics, ImgList, TB2Item, TBXUtils, TBXThemes, TBXOfficeXPTheme,
+ PngImageList, PngFunctions, pngimage;
+
+type
+ TPngTBXOfficeXPTheme = class(TTBXOfficeXPTheme)
+ public
+ procedure PaintImage(Canvas: TCanvas; ARect: TRect; const ItemInfo: TTBXItemInfo; ImageList: TCustomImageList; ImageIndex: Integer); override;
+ end;
+
+implementation
+
+const
+ ThemeName = 'OfficeXP';
+
+{ Globals }
+
+procedure HighlightTBXIcon(Canvas: TCanvas; const R: TRect; ImageList: TCustomImageList; ImageIndex: Integer; HighlightColor: TColor; Amount: Byte);
+var
+ ImageWidth, ImageHeight, X, Y: Integer;
+ DestPng, Png: TPNGObject;
+ W1, W2: Byte;
+ CBRB, CBG, S, C: Cardinal;
+ Assigner: TBitmap;
+ TransparencyColor: TColor;
+ Line: PByteArray;
+begin
+//If the imagelist is not the PngImageList, then invoke the default call.
+if not (ImageList is TPngImageList)
+then begin
+ TBXUtils.HighlightTBXIcon(Canvas, R, ImageList, ImageIndex, HighlightColor, Amount);
+ Exit;
+ end;
+
+//Get the size of the image
+ImageWidth := R.Right - R.Left;
+ImageHeight := R.Bottom - R.Top;
+with ImageList
+do begin
+ if Width < ImageWidth
+ then ImageWidth := Width;
+ if Height < ImageHeight
+ then ImageHeight := Height;
+ end;
+
+//Recieve a copy of the image in the imagelist
+Png := TPngImageList(ImageList).PngImages[ImageIndex].PngImage;
+DestPng := TPNGObject.Create;
+try
+ //Create a new PNG by assigning a TBitmap
+ Assigner := TBitmap.Create;
+ try
+ Assigner.Width := Png.Width;
+ Assigner.Height := Png.Height;
+ DestPng.Assign(Assigner);
+ finally
+ Assigner.Free;
+ end;
+
+ //Copy alpha channel, if available
+ if Png.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA]
+ then begin
+ DestPng.CreateAlpha;
+ for Y := 0 to Png.Height - 1
+ do CopyMemory(DestPng.AlphaScanline[Y], Png.AlphaScanline[Y], Png.Width);
+ end
+ else if Png.TransparencyMode = ptmBit
+ then begin
+ TransparencyColor := Png.TransparentColor;
+ DestPng.CreateAlpha;
+ for Y := 0 to Png.Height - 1
+ do begin
+ Line := DestPng.AlphaScanline[Y];
+ for X := 0 to Png.Width - 1
+ do if Png.Pixels[X, Y] = TransparencyColor
+ then Line^[X] := 0
+ else Line^[X] := 255;
+ end;
+ end;
+
+ //Initialize variables that help generate the lighted icon
+ W2 := Amount;
+ W1 := 255 - W2;
+ HighlightColor := GetBGR(ColorToRGB(HighlightColor));
+ CBRB := (Cardinal(HighlightColor) and $00FF00FF) * W1;
+ CBG := (Cardinal(HighlightColor) and $0000FF00) * W1;
+
+ //Loop through every pixel
+ for Y := 0 to ImageHeight - 1
+ do for X := 0 to ImageWidth - 1
+ do begin
+ //Lighten a pixel, basically the same way as in the original OfficeXP theme,
+ //only this function preserves the alpha channel
+ S := Png.Pixels[X, Y];
+ C := ((S and $FF00FF) * W2 + CBRB) and $FF00FF00 + ((S and $00FF00) * W2 + CBG) and $00FF0000;
+ DestPng.Pixels[X, Y] := C shr 8;
+ end;
+ DestPng.Draw(Canvas, R);
+finally
+ DestPng.Free;
+ end;
+end;
+
+procedure DrawTBXIconFullShadow(Canvas: TCanvas; const R: TRect; ImageList: TCustomImageList; ImageIndex: Integer; ShadowColor: TColor);
+
+ function Perform_DSPDxax(const Source, Dest, Brush: Byte): Byte;
+ begin
+ //It was neccesary to translate the ternary raster operation ROP_DSPDxax into
+ //normal code, because it's not using a Blt function.
+ //See also: http://msdn.microsoft.com/library/en-us/gdi/pantdraw_6n77.asp
+ Result := Dest xor Brush and Source xor Dest;
+ end;
+
+var
+ Assigner: TBitmap;
+ ImageWidth, ImageHeight, X, Y: Integer;
+ DestPng, Png: TPNGObject;
+ DestColor, TransparencyColor: TColor;
+ BrushR, BrushG, BrushB, DestR, DestG, DestB: Byte;
+ Line: PByteArray;
+begin
+//If the imagelist is not the PngImageList, then invoke the default call.
+if not (ImageList is TPngImageList)
+then begin
+ TBXUtils.DrawTBXIconFullShadow(Canvas, R, ImageList, ImageIndex, ShadowColor);
+ Exit;
+ end;
+
+//Get the size of the image
+ImageWidth := R.Right - R.Left;
+ImageHeight := R.Bottom - R.Top;
+with ImageList
+do begin
+ if Width < ImageWidth
+ then ImageWidth := Width;
+ if Height < ImageHeight
+ then ImageHeight := Height;
+ end;
+
+//Recieve a copy of the image in the imagelist
+Png := TPngImageList(ImageList).PngImages[ImageIndex].PngImage;
+DestPng := TPNGObject.Create;
+try
+ //Create a new PNG by assigning a TBitmap
+ Assigner := TBitmap.Create;
+ try
+ Assigner.Width := Png.Width;
+ Assigner.Height := Png.Height;
+ DestPng.Assign(Assigner);
+ finally
+ Assigner.Free;
+ end;
+
+ //Copy alpha channel, if available
+ if Png.Header.ColorType in [COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA]
+ then begin
+ DestPng.CreateAlpha;
+ for Y := 0 to Png.Height - 1
+ do CopyMemory(DestPng.AlphaScanline[Y], Png.AlphaScanline[Y], Png.Width);
+ end
+ else if Png.TransparencyMode = ptmBit
+ then begin
+ TransparencyColor := Png.TransparentColor;
+ DestPng.CreateAlpha;
+ for Y := 0 to Png.Height - 1
+ do begin
+ Line := DestPng.AlphaScanline[Y];
+ for X := 0 to Png.Width - 1
+ do if Png.Pixels[X, Y] = TransparencyColor
+ then Line^[X] := 0
+ else Line^[X] := 255;
+ end;
+ end;
+
+ //BrushX values for the raster opration
+ BrushR := ShadowColor and $FF;
+ BrushG := ShadowColor shr 8 and $FF;
+ BrushB := ShadowColor shr 16 and $FF;
+
+ //Loop through every pixel to generate a shadow
+ for Y := 0 to ImageHeight - 1
+ do for X := 0 to ImageWidth - 1
+ do begin
+ //These call the raster operation that generate a shadow image. The raster
+ //operation "DSPDxax" is basically the same as BitBlt with ROP_DSPDxax as the
+ //last parameter, but since we're modifying the PNG image itself, the operation
+ //needed to be translated to normal code.
+ DestColor := GetPixel(Canvas.Handle, R.Left + X, R.Top + Y);
+ DestR := Perform_DSPDxax(255, DestColor and $FF, BrushR);
+ DestG := Perform_DSPDxax(255, DestColor shr 8 and $FF, BrushG);
+ DestB := Perform_DSPDxax(255, DestColor shr 16 and $FF, BrushB);
+ DestPng.Pixels[X, Y] := RGB(DestR, DestG, DestB);
+ end;
+ DestPng.Draw(Canvas, R);
+finally
+ DestPng.Free;
+ end;
+end;
+
+procedure DrawTBXIconFlatShadow(Canvas: TCanvas; const R: TRect; ImageList: TCustomImageList; ImageIndex: Integer; ShadowColor: TColor);
+var
+ Png: TPNGObject;
+begin
+//If the imagelist is not the PngImageList, then invoke the default call.
+if not (ImageList is TPngImageList)
+then begin
+ TBXUtils.DrawTBXIconFullShadow(Canvas, R, ImageList, ImageIndex, ShadowColor);
+ Exit;
+ end;
+
+//Recieve a copy of the image in the imagelist, if available
+Png := TPngImageList(ImageList).PngImages[ImageIndex].Duplicate;
+try
+ //Now draw the PNG with the appropriate options, to make it appear
+ //disabled
+ DrawPNG(Png, Canvas, R, TPngImageList(ImageList).PngOptions);
+finally
+ Png.Free;
+ end;
+end;
+
+{ TPngTBXOfficeXPTheme }
+
+procedure TPngTBXOfficeXPTheme.PaintImage(Canvas: TCanvas; ARect: TRect; const ItemInfo: TTBXItemInfo; ImageList: TCustomImageList; ImageIndex: Integer);
+var
+ HiContrast: Boolean;
+begin
+//This method is the same as in the original OfficeXP theme, for the most part.
+with ItemInfo
+do begin
+ if ImageList is TTBCustomImageList
+ then begin
+ TTBCustomImageList(ImageList).DrawState(Canvas, ARect.Left, ARect.Top, ImageIndex, Enabled, (HoverKind <> hkNone), Selected);
+ Exit;
+ end;
+
+ HiContrast := IsDarkColor(GetItemImageBackground(ItemInfo), 64);
+ if not Enabled
+ then begin
+ DrawTBXIconFlatShadow(Canvas, ARect, ImageList, ImageIndex, BtnItemColors[bisDisabled, ipText]);
+ end
+ else if Selected or Pushed or (HoverKind <> hkNone)
+ then begin
+ if not (Selected or Pushed and not IsPopupParent)
+ then begin
+ OffsetRect(ARect, 1, 1);
+ DrawTBXIconFullShadow(Canvas, ARect, ImageList, ImageIndex, IconShadowColor);
+ OffsetRect(ARect, -2, -2);
+ end;
+ DrawTBXIcon(Canvas, ARect, ImageList, ImageIndex, HiContrast);
+ end
+ else if HiContrast or TBXHiContrast or TBXLoColor
+ then DrawTBXIcon(Canvas, ARect, ImageList, ImageIndex, HiContrast)
+ else HighlightTBXIcon(Canvas, ARect, ImageList, ImageIndex, clWindow, 178);
+ end;
+end;
+
+initialization
+ //Unregister the original OfficeXP theme and replace it with the PNG-aware
+ //version. It is neccesary either to not include TBXOfficeXPTheme in your uses
+ //clause, or to make sure this unit gets initialized *after* TBXOfficeXPTheme.
+ if IsTBXThemeAvailable(ThemeName)
+ then UnregisterTBXTheme(ThemeName);
+ RegisterTBXTheme(ThemeName, TPngTBXOfficeXPTheme);
+
+end.
diff --git a/internal/1.0 RC3/1/Source/obj/adler32.obj b/internal/1.0 RC3/1/Source/obj/adler32.obj
new file mode 100644
index 0000000..05f9cf6
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/adler32.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/compress.obj b/internal/1.0 RC3/1/Source/obj/compress.obj
new file mode 100644
index 0000000..a70c37a
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/compress.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/crc32.obj b/internal/1.0 RC3/1/Source/obj/crc32.obj
new file mode 100644
index 0000000..ea14153
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/crc32.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/deflate.obj b/internal/1.0 RC3/1/Source/obj/deflate.obj
new file mode 100644
index 0000000..cc03a6f
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/deflate.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/gzio.obj b/internal/1.0 RC3/1/Source/obj/gzio.obj
new file mode 100644
index 0000000..ff94037
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/gzio.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/infback.obj b/internal/1.0 RC3/1/Source/obj/infback.obj
new file mode 100644
index 0000000..057c1a7
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/infback.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/infblock.obj b/internal/1.0 RC3/1/Source/obj/infblock.obj
new file mode 100644
index 0000000..3bc38e4
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/infblock.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/infcodes.obj b/internal/1.0 RC3/1/Source/obj/infcodes.obj
new file mode 100644
index 0000000..faec222
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/infcodes.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/inffast.obj b/internal/1.0 RC3/1/Source/obj/inffast.obj
new file mode 100644
index 0000000..92279d3
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/inffast.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/inflate.obj b/internal/1.0 RC3/1/Source/obj/inflate.obj
new file mode 100644
index 0000000..dbd7956
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/inflate.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/inftrees.obj b/internal/1.0 RC3/1/Source/obj/inftrees.obj
new file mode 100644
index 0000000..a4fa0ae
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/inftrees.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/infutil.obj b/internal/1.0 RC3/1/Source/obj/infutil.obj
new file mode 100644
index 0000000..7e175a8
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/infutil.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/trees.obj b/internal/1.0 RC3/1/Source/obj/trees.obj
new file mode 100644
index 0000000..f09517f
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/trees.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/uncompr.obj b/internal/1.0 RC3/1/Source/obj/uncompr.obj
new file mode 100644
index 0000000..12cd70b
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/uncompr.obj differ
diff --git a/internal/1.0 RC3/1/Source/obj/zutil.obj b/internal/1.0 RC3/1/Source/obj/zutil.obj
new file mode 100644
index 0000000..9395409
Binary files /dev/null and b/internal/1.0 RC3/1/Source/obj/zutil.obj differ
diff --git a/internal/1.0 RC3/1/Source/pngextra.pas b/internal/1.0 RC3/1/Source/pngextra.pas
new file mode 100644
index 0000000..c219e7e
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/pngextra.pas
@@ -0,0 +1,353 @@
+unit pngextra;
+
+interface
+
+uses
+ Windows, Graphics, Messages, SysUtils, Classes, Controls, pngimage, Buttons,
+ ExtCtrls;
+
+type
+ TPNGButtonStyle = (pbsDefault, pbsFlat, pbsNoFrame);
+ TPNGButtonLayout = (pbsImageAbove, pbsImageBellow, pbsImageLeft,
+ pbsImageRight);
+ TPNGButtonState = (pbsNormal, pbsDown, pbsDisabled);
+
+ TPNGButton = class(TGraphicControl)
+ private
+ {Holds the property values}
+ fButtonStyle: TPNGButtonStyle;
+ fMouseOverControl: Boolean;
+ FCaption: String;
+ FButtonLayout: TPNGButtonLayout;
+ FButtonState: TPNGButtonState;
+ FImageDown: TPNGObject;
+ fImageNormal: TPNGObject;
+ fImageDisabled: TPNGObject;
+ fImageOver: TPNGObject;
+ fOnMouseEnter, fOnMouseExit: TNotifyEvent;
+ {Procedures for setting the property values}
+ procedure SetButtonStyle(const Value: TPNGButtonStyle);
+ procedure SetCaption(const Value: String);
+ procedure SetButtonLayout(const Value: TPNGButtonLayout);
+ procedure SetButtonState(const Value: TPNGButtonState);
+ procedure SetImageNormal(const Value: TPNGObject);
+ procedure SetImageDown(const Value: TPNGObject);
+ procedure SetImageOver(const Value: TPNGObject);
+ published
+ {Published properties}
+ property Font;
+ property Visible;
+ property ButtonLayout: TPNGButtonLayout read FButtonLayout write SetButtonLayout;
+ property Caption: String read FCaption write SetCaption;
+ property ImageNormal: TPNGObject read fImageNormal write SetImageNormal;
+ property ImageDown: TPNGObject read FImageDown write SetImageDown;
+ property ImageOver: TPNGObject read FImageOver write SetImageOver;
+ property ButtonStyle: TPNGButtonStyle read fButtonStyle
+ write SetButtonStyle;
+ property Enabled;
+ property ParentShowHint;
+ property ShowHint;
+ {Default events}
+ property OnMouseDown;
+ property OnClick;
+ property OnMouseUp;
+ property OnMouseMove;
+ property OnDblClick;
+ property OnMouseEnter: TNotifyEvent read fOnMouseEnter write fOnMouseEnter;
+ property OnMouseExit: TNotifyEvent read fOnMouseExit write fOnMouseExit;
+ public
+ {Public properties}
+ property ButtonState: TPNGButtonState read FButtonState write SetButtonState;
+ protected
+ {Being painted}
+ procedure Paint; override;
+ {Clicked}
+ procedure Click; override;
+ {Mouse pressed}
+ procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
+ X, Y: Integer); override;
+ procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
+ X, Y: Integer); override;
+ procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
+ {Mouse entering or leaving}
+ procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
+ procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
+ {Being enabled or disabled}
+ procedure CMEnabledChanged(var Message: TMessage);
+ message CM_ENABLEDCHANGED;
+ public
+ {Returns if the mouse is over the control}
+ property IsMouseOver: Boolean read fMouseOverControl;
+ {Constructor and destructor}
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ end;
+
+procedure Register;
+procedure MakeImageHalfTransparent(Source, Dest: TPNGObject);
+
+implementation
+
+procedure Register;
+begin
+ RegisterComponents('Samples', [TPNGButton]);
+end;
+
+procedure MakeImageHalfTransparent(Source, Dest: TPNGObject);
+var
+ i, j: Integer;
+begin
+ Dest.Assign(Source);
+ Dest.CreateAlpha;
+ if (Dest.Header.ColorType <> COLOR_PALETTE) then
+ for j := 0 to Source.Height - 1 do
+ for i := 0 to Source.Width - 1 do
+ Dest.AlphaScanline[j]^[i] := Dest.AlphaScanline[j]^[i] div 3;
+end;
+
+{TPNGButton implementation}
+
+{Being created}
+constructor TPNGButton.Create(AOwner: TComponent);
+begin
+ {Calls ancestor}
+ inherited Create(AOwner);
+ {Creates the TPNGObjects}
+ fImageNormal := TPNGObject.Create;
+ fImageDown := TPNGObject.Create;
+ fImageDisabled := TPNGObject.Create;
+ fImageOver := TPNGObject.Create;
+ {Initial properties}
+ ControlStyle := ControlStyle + [csCaptureMouse];
+ SetBounds(Left, Top, 23, 23);
+ fMouseOverControl := False;
+ fButtonLayout := pbsImageAbove;
+ fButtonState := pbsNormal
+end;
+
+destructor TPNGButton.Destroy;
+begin
+ {Frees the TPNGObject}
+ fImageNormal.Free;
+ fImageDown.Free;
+ fImageDisabled.Free;
+ fImageOver.Free;
+
+ {Calls ancestor}
+ inherited Destroy;
+end;
+
+{Being enabled or disabled}
+procedure TPNGButton.CMEnabledChanged(var Message: TMessage);
+begin
+ if not Enabled then MakeImageHalfTransparent(fImageNormal, fImageDisabled);
+ if Enabled then ButtonState := pbsNormal else ButtonState := pbsDisabled
+end;
+
+{Returns the largest number}
+function Max(A, B: Integer): Integer;
+begin
+ if A > B then Result := A else Result := B
+end;
+
+{Button being painted}
+procedure TPNGButton.Paint;
+const
+ Slide: Array[false..true] of Integer = (0, 2);
+var
+ Area: TRect;
+ TextSize, ImageSize: TSize;
+ TextPos, ImagePos: TPoint;
+ Image: TPNGObject;
+ Pushed: Boolean;
+begin
+ {Prepares the canvas}
+ Canvas.Font.Assign(Font);
+
+ {Determines if the button is pushed}
+ Pushed := (ButtonState = pbsDown) and IsMouseOver;
+
+ {Determines the image to use}
+ if (Pushed) and not fImageDown.Empty then
+ Image := fImageDown
+ else if IsMouseOver and not fImageOver.Empty and Enabled then
+ Image := fImageOver
+ else if (ButtonState = pbsDisabled) and not fImageDisabled.Empty then
+ Image := fImageDisabled
+ else
+ Image := fImageNormal;
+
+ {Get the elements size}
+ ImageSize.cx := Image.Width;
+ ImageSize.cy := Image.Height;
+ Area := ClientRect;
+ if Caption <> '' then
+ begin
+ TextSize := Canvas.TextExtent(Caption);
+ ImageSize.cy := ImageSize.Cy + 4;
+ end else FillChar(TextSize, SizeOf(TextSize), #0);
+
+ {Set the elements position}
+ ImagePos.X := (Width - ImageSize.cx) div 2 + Slide[Pushed];
+ TextPos.X := (Width - TextSize.cx) div 2 + Slide[Pushed];
+ TextPos.Y := (Height - TextSize.cy) div 2;
+ ImagePos.Y := (Height - ImageSize.cy) div 2;
+ case ButtonLayout of
+ pbsImageAbove: begin
+ ImagePos.Y := (Height - ImageSize.cy - TextSize.cy) div 2;
+ TextPos.Y := ImagePos.Y + ImageSize.cy;
+ end;
+ pbsImageBellow: begin
+ TextPos.Y := (Height - ImageSize.cy - TextSize.cy) div 2;
+ ImagePos.Y := TextPos.Y + TextSize.cy;
+ end;
+ pbsImageLeft: begin
+ ImagePos.X := (Width - ImageSize.cx - TextSize.cx) div 2;
+ TextPos.X := ImagePos.X + ImageSize.cx + 5;
+ end;
+ pbsImageRight: begin
+ TextPos.X := (Width - ImageSize.cx - TextSize.cx) div 2;;
+ ImagePos.X := TextPos.X + TextSize.cx + 5;
+ end
+ end;
+ ImagePos.Y := ImagePos.Y + Slide[Pushed];
+ TextPos.Y := TextPos.Y + Slide[Pushed];
+
+ {Draws the border}
+ if ButtonStyle = pbsFlat then
+ begin
+ if ButtonState <> pbsDisabled then
+ if (Pushed) then
+ Frame3D(Canvas, Area, clBtnShadow, clBtnHighlight, 1)
+ else if IsMouseOver or (ButtonState = pbsDown) then
+ Frame3D(Canvas, Area, clBtnHighlight, clBtnShadow, 1)
+ end
+ else if ButtonStyle = pbsDefault then
+ DrawButtonFace(Canvas, Area, 1, bsNew, TRUE, Pushed, FALSE);
+
+ {Draws the elements}
+ Canvas.Brush.Style := bsClear;
+ Canvas.Draw(ImagePos.X, ImagePos.Y, Image);
+ if ButtonState = pbsDisabled then Canvas.Font.Color := clGrayText;
+ Canvas.TextRect(Area, TextPos.X, TextPos.Y, Caption)
+end;
+
+{Changing the button Layout property}
+procedure TPNGButton.SetButtonLayout(const Value: TPNGButtonLayout);
+begin
+ FButtonLayout := Value;
+ Repaint
+end;
+
+{Changing the button state property}
+procedure TPNGButton.SetButtonState(const Value: TPNGButtonState);
+begin
+ FButtonState := Value;
+ Repaint
+end;
+
+{Changing the button style property}
+procedure TPNGButton.SetButtonStyle(const Value: TPNGButtonStyle);
+begin
+ fButtonStyle := Value;
+ Repaint
+end;
+
+{Changing the caption property}
+procedure TPNGButton.SetCaption(const Value: String);
+begin
+ FCaption := Value;
+ Repaint
+end;
+
+{Changing the image property}
+procedure TPNGButton.SetImageNormal(const Value: TPNGObject);
+begin
+ fImageNormal.Assign(Value);
+ MakeImageHalfTransparent(fImageNormal, fImageDisabled);
+ Repaint
+end;
+
+{Setting the down image}
+procedure TPNGButton.SetImageDown(const Value: TPNGObject);
+begin
+ FImageDown.Assign(Value);
+ Repaint
+end;
+
+{Setting the over image}
+procedure TPNGButton.SetImageOver(const Value: TPNGObject);
+begin
+ fImageOver.Assign(Value);
+ Repaint
+end;
+
+{Mouse pressed}
+procedure TPNGButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
+ Y: Integer);
+begin
+ {Changes the state and repaints}
+ if (ButtonState = pbsNormal) and (Button = mbLeft) then
+ ButtonState := pbsDown;
+ {Calls ancestor}
+ inherited
+end;
+
+{Being clicked}
+procedure TPNGButton.Click;
+begin
+ if ButtonState = pbsDown then ButtonState := pbsNormal;
+ inherited Click;
+end;
+
+{Mouse released}
+procedure TPNGButton.MouseUp(Button: TMouseButton; Shift: TShiftState; X,
+ Y: Integer);
+begin
+ {Changes the state and repaints}
+ if ButtonState = pbsDown then ButtonState := pbsNormal;
+ {Calls ancestor}
+ inherited
+end;
+
+{Mouse moving over the control}
+procedure TPNGButton.MouseMove(Shift: TShiftState; X, Y: Integer);
+begin
+ {In case cursor is over the button}
+ if (X >= 0) and (X < ClientWidth) and (Y >= 0) and (Y <= ClientHeight) and
+ (fMouseOverControl = False) and (ButtonState <> pbsDown) then
+ begin
+ fMouseOverControl := True;
+ Repaint;
+ end;
+
+ {Calls ancestor}
+ inherited;
+
+end;
+
+{Mouse is now over the control}
+procedure TPNGButton.CMMouseEnter(var Message: TMessage);
+begin
+ if Enabled then
+ begin
+ if Assigned(fOnMouseEnter) then fOnMouseEnter(Self);
+ fMouseOverControl := True;
+ Repaint
+ end
+end;
+
+{Mouse has left the control}
+procedure TPNGButton.CMMouseLeave(var Message: TMessage);
+begin
+ if Enabled then
+ begin
+ if Assigned(fOnMouseExit) then FOnMouseExit(Self);
+ fMouseOverControl := False;
+ Repaint
+ end
+end;
+
+
+
+end.
diff --git a/internal/1.0 RC3/1/Source/pngimage.pas b/internal/1.0 RC3/1/Source/pngimage.pas
new file mode 100644
index 0000000..874c836
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/pngimage.pas
@@ -0,0 +1,5262 @@
+{Portable Network Graphics Delphi 1.4361 (8 March 2003) }
+
+{This is the latest implementation for TPngImage component }
+{It's meant to be a full replacement for the previous one. }
+{There are lots of new improvements, including cleaner code, }
+{full partial transparency support, speed improvements, }
+{saving using ADAM 7 interlacing, better error handling, also }
+{the best compression for the final image ever. And now it's }
+{truly able to read about any png image. }
+
+{
+ Version 1.4361
+ 2003-03-04 - Fixed important bug for simple transparency when using
+ RGB, Grayscale color modes
+
+ Version 1.436
+ 2003-03-04 - * NEW * Property Pixels for direct access to pixels
+ * IMPROVED * Palette property (TPngObject) (read only)
+ Slovenian traslation for the component (Miha Petelin)
+ Help file update (scanline article/png->jpg example)
+
+ Version 1.435
+ 2003-11-03 - * NEW * New chunk implementation zTXt (method AddzTXt)
+ * NEW * New compiler flags to store the extra 8 bits
+ from 16 bits samples (when saving it is ignored), the
+ extra data may be acessed using ExtraScanline property
+ * Fixed * a bug on tIMe chunk
+ French translation included (Thanks to IBE Software)
+ Bugs fixed
+
+ Version 1.432
+ 2002-08-24 - * NEW * A new method, CreateAlpha will transform the
+ current image into partial transparency.
+ Help file updated with a new article on how to handle
+ partial transparency.
+
+ Version 1.431
+ 2002-08-14 - Fixed and tested to work on:
+ C++ Builder 3
+ C++ Builder 5
+ Delphi 3
+ There was an error when setting TransparentColor, fixed
+ New method, RemoveTransparency to remove image
+ BIT TRANSPARENCY
+
+ Version 1.43
+ 2002-08-01 - * NEW * Support for Delphi 3 and C++ Builder 3
+ Implements mostly some things that were missing,
+ a few tweaks and fixes.
+
+ Version 1.428
+ 2002-07-24 - More minor fixes (thanks to Ian Boyd)
+ Bit transparency fixes
+ * NEW * Finally support to bit transparency
+ (palette / rgb / grayscale -> all)
+
+ Version 1.427
+ 2002-07-19 - Lots of bugs and leaks fixed
+ * NEW * method to easy adding text comments, AddtEXt
+ * NEW * property for setting bit transparency,
+ TransparentColor
+
+ Version 1.426
+ 2002-07-18 - Clipboard finally fixed (hope)
+ Changed UseDelphi trigger to UseDelphi
+ * NEW * Support for bit transparency bitmaps
+ when assigning from/to TBitmap objects
+ Altough it does not support drawing transparent
+ parts of bit transparency pngs (only partial)
+ it is closer than ever
+
+ Version 1.425
+ 2002-07-01 - Clipboard methods implemented
+ Lots of bugs fixed
+
+ Version 1.424
+ 2002-05-16 - Scanline and AlphaScanline are now working correctly.
+ New methods for handling the clipboard
+
+ Version 1.423
+ 2002-05-16 - * NEW * Partial transparency for 1, 2, 4 and 8 bits is
+ also supported using the tRNS chunk (for palette and
+ grayscaling).
+ New bug fixes (Peter Haas).
+
+ Version 1.422
+ 2002-05-14 - Fixed some critical leaks, thanks to Peter Haas tips.
+ New translation for German (Peter Haas).
+
+ Version 1.421
+ 2002-05-06 - Now uses new ZLIB version, 1.1.4 with some security
+ fixes.
+ LoadFromResourceID and LoadFromResourceName added and
+ help file updated for that.
+ The resources strings are now located in pnglang.pas.
+ New translation for Brazilian Portuguese.
+ Bugs fixed.
+
+ IMPORTANT: I'm currently looking for bugs on the library. If
+ anyone has found one, please send me an email and
+ I will fix right away. Thanks for all the help and
+ ideias I'm receiving so far.}
+
+{My new email is: gubadaud@terra.com.br}
+{Website link : pngdelphi.sourceforge.net}
+{Gustavo Huffenbacher Daud}
+
+unit pngimage;
+
+interface
+
+{Triggers avaliable (edit the fields bellow)}
+{$DEFINE UseDelphi} //Disable fat vcl units (perfect to small apps)
+{$DEFINE ErrorOnUnknownCritical} //Error when finds an unknown critical chunk
+{$DEFINE CheckCRC} //Enables CRC checking
+{$DEFINE RegisterGraphic} //Registers TPNGObject to use with TPicture
+{$DEFINE PartialTransparentDraw} //Draws partial transparent images
+{.$DEFINE Store16bits} //Stores the extra 8 bits from 16bits/sample
+{.$DEFINE Debug} //For programming purposes
+{$RANGECHECKS OFF} {$J+}
+
+
+
+uses
+ Windows {$IFDEF UseDelphi}, Classes, Graphics, SysUtils{$ENDIF} {$IFDEF Debug},
+ dialogs{$ENDIF}, pngzlib, pnglang;
+
+{$IFNDEF UseDelphi}
+ const
+ soFromBeginning = 0;
+ soFromCurrent = 1;
+ soFromEnd = 2;
+{$ENDIF}
+
+const
+ {ZLIB constants}
+ ZLIBErrors: Array[-6..2] of string = ('incompatible version (-6)',
+ 'buffer error (-5)', 'insufficient memory (-4)', 'data error (-3)',
+ 'stream error (-2)', 'file error (-1)', '(0)', 'stream end (1)',
+ 'need dictionary (2)');
+ Z_NO_FLUSH = 0;
+ Z_FINISH = 4;
+ Z_STREAM_END = 1;
+
+ {Avaliable PNG filters for mode 0}
+ FILTER_NONE = 0;
+ FILTER_SUB = 1;
+ FILTER_UP = 2;
+ FILTER_AVERAGE = 3;
+ FILTER_PAETH = 4;
+
+ {Avaliable color modes for PNG}
+ COLOR_GRAYSCALE = 0;
+ COLOR_RGB = 2;
+ COLOR_PALETTE = 3;
+ COLOR_GRAYSCALEALPHA = 4;
+ COLOR_RGBALPHA = 6;
+
+
+type
+ {$IFNDEF UseDelphi}
+ {Custom exception handler}
+ Exception = class(TObject)
+ constructor Create(Msg: String);
+ end;
+ ExceptClass = class of Exception;
+ TColor = ColorRef;
+ {$ENDIF}
+
+ {Error types}
+ EPNGOutMemory = class(Exception);
+ EPngError = class(Exception);
+ EPngUnexpectedEnd = class(Exception);
+ EPngInvalidCRC = class(Exception);
+ EPngInvalidIHDR = class(Exception);
+ EPNGMissingMultipleIDAT = class(Exception);
+ EPNGZLIBError = class(Exception);
+ EPNGInvalidPalette = class(Exception);
+ EPNGInvalidFileHeader = class(Exception);
+ EPNGIHDRNotFirst = class(Exception);
+ EPNGNotExists = class(Exception);
+ EPNGSizeExceeds = class(Exception);
+ EPNGMissingPalette = class(Exception);
+ EPNGUnknownCriticalChunk = class(Exception);
+ EPNGUnknownCompression = class(Exception);
+ EPNGUnknownInterlace = class(Exception);
+ EPNGNoImageData = class(Exception);
+ EPNGCouldNotLoadResource = class(Exception);
+ EPNGCannotChangeTransparent = class(Exception);
+ EPNGHeaderNotPresent = class(Exception);
+
+type
+ {Direct access to pixels using R,G,B}
+ TRGBLine = array[word] of TRGBTriple;
+ pRGBLine = ^TRGBLine;
+
+ {Same as TBitmapInfo but with allocated space for}
+ {palette entries}
+ TMAXBITMAPINFO = packed record
+ bmiHeader: TBitmapInfoHeader;
+ bmiColors: packed array[0..255] of TRGBQuad;
+ end;
+
+ {Transparency mode for pngs}
+ TPNGTransparencyMode = (ptmNone, ptmBit, ptmPartial);
+ {Pointer to a cardinal type}
+ pCardinal = ^Cardinal;
+ {Access to a rgb pixel}
+ pRGBPixel = ^TRGBPixel;
+ TRGBPixel = packed record
+ B, G, R: Byte;
+ end;
+
+ {Pointer to an array of bytes type}
+ TByteArray = Array[Word] of Byte;
+ pByteArray = ^TByteArray;
+
+ {Forward}
+ TPNGObject = class;
+ pPointerArray = ^TPointerArray;
+ TPointerArray = Array[Word] of Pointer;
+
+ {Contains a list of objects}
+ TPNGPointerList = class
+ private
+ fOwner: TPNGObject;
+ fCount : Cardinal;
+ fMemory: pPointerArray;
+ function GetItem(Index: Cardinal): Pointer;
+ procedure SetItem(Index: Cardinal; const Value: Pointer);
+ protected
+ {Removes an item}
+ function Remove(Value: Pointer): Pointer; virtual;
+ {Inserts an item}
+ procedure Insert(Value: Pointer; Position: Cardinal);
+ {Add a new item}
+ procedure Add(Value: Pointer);
+ {Returns an item}
+ property Item[Index: Cardinal]: Pointer read GetItem write SetItem;
+ {Set the size of the list}
+ procedure SetSize(const Size: Cardinal);
+ {Returns owner}
+ property Owner: TPNGObject read fOwner;
+ public
+ {Returns number of items}
+ property Count: Cardinal read fCount write SetSize;
+ {Object being either created or destroyed}
+ constructor Create(AOwner: TPNGObject);
+ destructor Destroy; override;
+ end;
+
+ {Forward declaration}
+ TChunk = class;
+ TChunkClass = class of TChunk;
+
+ {Same as TPNGPointerList but providing typecasted values}
+ TPNGList = class(TPNGPointerList)
+ private
+ {Used with property Item}
+ function GetItem(Index: Cardinal): TChunk;
+ public
+ {Removes an item}
+ procedure RemoveChunk(Chunk: TChunk); overload;
+ {Add a new chunk using the class from the parameter}
+ function Add(ChunkClass: TChunkClass): TChunk;
+ {Returns pointer to the first chunk of class}
+ function ItemFromClass(ChunkClass: TChunkClass): TChunk;
+ {Returns a chunk item from the list}
+ property Item[Index: Cardinal]: TChunk read GetItem;
+ end;
+
+ {$IFNDEF UseDelphi}
+ {The STREAMs bellow are only needed in case delphi provided ones is not}
+ {avaliable (UseDelphi trigger not set)}
+ {Object becomes handles}
+ TCanvas = THandle;
+ TBitmap = HBitmap;
+ {Trick to work}
+ TPersistent = TObject;
+
+ {Base class for all streams}
+ TStream = class
+ protected
+ {Returning/setting size}
+ function GetSize: Longint; virtual;
+ procedure SetSize(const Value: Longint); virtual; abstract;
+ {Returns/set position}
+ function GetPosition: Longint; virtual;
+ procedure SetPosition(const Value: Longint); virtual;
+ public
+ {Returns/sets current position}
+ property Position: Longint read GetPosition write SetPosition;
+ {Property returns/sets size}
+ property Size: Longint read GetSize write SetSize;
+ {Allows reading/writing data}
+ function Read(var Buffer; Count: Longint): Cardinal; virtual; abstract;
+ function Write(const Buffer; Count: Longint): Cardinal; virtual; abstract;
+ {Copies from another Stream}
+ function CopyFrom(Source: TStream;
+ Count: Cardinal): Cardinal; virtual;
+ {Seeks a stream position}
+ function Seek(Offset: Longint; Origin: Word): Longint; virtual; abstract;
+ end;
+
+ {File stream modes}
+ TFileStreamMode = (fsmRead, fsmWrite, fsmCreate);
+ TFileStreamModeSet = set of TFileStreamMode;
+
+ {File stream for reading from files}
+ TFileStream = class(TStream)
+ private
+ {Opened mode}
+ Filemode: TFileStreamModeSet;
+ {Handle}
+ fHandle: THandle;
+ protected
+ {Set the size of the file}
+ procedure SetSize(const Value: Longint); override;
+ public
+ {Seeks a file position}
+ function Seek(Offset: Longint; Origin: Word): Longint; override;
+ {Reads/writes data from/to the file}
+ function Read(var Buffer; Count: Longint): Cardinal; override;
+ function Write(const Buffer; Count: Longint): Cardinal; override;
+ {Stream being created and destroy}
+ constructor Create(Filename: String; Mode: TFileStreamModeSet);
+ destructor Destroy; override;
+ end;
+
+ {Stream for reading from resources}
+ TResourceStream = class(TStream)
+ constructor Create(Instance: HInst; const ResName: String; ResType:PChar);
+ private
+ {Variables for reading}
+ Size: Integer;
+ Memory: Pointer;
+ Position: Integer;
+ protected
+ {Set the size of the file}
+ procedure SetSize(const Value: Longint); override;
+ public
+ {Stream processing}
+ function Read(var Buffer; Count: Integer): Cardinal; override;
+ function Seek(Offset: Integer; Origin: Word): Longint; override;
+ function Write(const Buffer; Count: Longint): Cardinal; override;
+ end;
+ {$ENDIF}
+
+ {Forward}
+ TChunkIHDR = class;
+ {Interlace method}
+ TInterlaceMethod = (imNone, imAdam7);
+ {Compression level type}
+ TCompressionLevel = 0..9;
+ {Filters type}
+ TFilter = (pfNone, pfSub, pfUp, pfAverage, pfPaeth);
+ TFilters = set of TFilter;
+
+ {Png implementation object}
+ TPngObject = class{$IFDEF UseDelphi}(TGraphic){$ENDIF}
+ protected
+ {Gamma table values}
+ GammaTable, InverseGamma: Array[Byte] of Byte;
+ procedure InitializeGamma;
+ private
+ {Temporary palette}
+ TempPalette: HPalette;
+ {Filters to test to encode}
+ fFilters: TFilters;
+ {Compression level for ZLIB}
+ fCompressionLevel: TCompressionLevel;
+ {Maximum size for IDAT chunks}
+ fMaxIdatSize: Cardinal;
+ {Returns if image is interlaced}
+ fInterlaceMethod: TInterlaceMethod;
+ {Chunks object}
+ fChunkList: TPngList;
+ {Clear all chunks in the list}
+ procedure ClearChunks;
+ {Returns if header is present}
+ function HeaderPresent: Boolean;
+ {Returns linesize and byte offset for pixels}
+ procedure GetPixelInfo(var LineSize, Offset: Cardinal);
+ procedure SetMaxIdatSize(const Value: Cardinal);
+ function GetAlphaScanline(const LineIndex: Integer): pByteArray;
+ function GetScanline(const LineIndex: Integer): Pointer;
+ {$IFDEF Store16bits}
+ function GetExtraScanline(const LineIndex: Integer): Pointer;
+ {$ENDIF}
+ function GetTransparencyMode: TPNGTransparencyMode;
+ function GetTransparentColor: TColor;
+ procedure SetTransparentColor(const Value: TColor);
+ protected
+ {Returns the image palette}
+ function GetPalette: HPALETTE; {$IFDEF UseDelphi}override;{$ENDIF}
+ {THANY: Sets a new palette}
+ procedure SetPalette(Value: HPALETTE); {$IFDEF UseDelphi}override;{$ENDIF}
+ {Returns/sets image width and height}
+ function GetWidth: Integer; {$IFDEF UseDelphi}override;{$ENDIF}
+ function GetHeight: Integer; {$IFDEF UseDelphi}override; {$ENDIF}
+ procedure SetWidth(Value: Integer); {$IFDEF UseDelphi}override; {$ENDIF}
+ procedure SetHeight(Value: Integer); {$IFDEF UseDelphi}override;{$ENDIF}
+ {Assigns from another TPNGObject}
+ procedure AssignPNG(Source: TPNGObject);
+ {Returns if the image is empty}
+ function GetEmpty: Boolean; {$IFDEF UseDelphi}override; {$ENDIF}
+ {Used with property Header}
+ function GetHeader: TChunkIHDR;
+ {Draws using partial transparency}
+ procedure DrawPartialTrans(DC: HDC; Rect: TRect);
+ {$IFDEF UseDelphi}
+ {Returns if the image is transparent}
+ function GetTransparent: Boolean; override;
+ {$ENDIF}
+ {Returns a pixel}
+ function GetPixels(const X, Y: Integer): TColor; virtual;
+ procedure SetPixels(const X, Y: Integer; const Value: TColor); virtual;
+ public
+ {Generates alpha information}
+ procedure CreateAlpha;
+ {Removes the image transparency}
+ procedure RemoveTransparency;
+ {Transparent color}
+ property TransparentColor: TColor read GetTransparentColor write
+ SetTransparentColor;
+ {Add text chunk, TChunkTEXT, TChunkzTXT}
+ procedure AddtEXt(const Keyword, Text: String);
+ procedure AddzTXt(const Keyword, Text: String);
+ {$IFDEF UseDelphi}
+ {Saves to clipboard format (thanks to Antoine Pottern)}
+ procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle;
+ var APalette: HPalette); override;
+ procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle;
+ APalette: HPalette); override;
+ {$ENDIF}
+ {Calling errors}
+ procedure RaiseError(ExceptionClass: ExceptClass; Text: String);
+ {Returns a scanline from png}
+ property Scanline[const Index: Integer]: Pointer read GetScanline;
+ {$IFDEF Store16bits}
+ property ExtraScanline[const Index: Integer]: Pointer read GetExtraScanline;
+ {$ENDIF}
+ property AlphaScanline[const Index: Integer]: pByteArray read GetAlphaScanline;
+ {Returns pointer to the header}
+ property Header: TChunkIHDR read GetHeader;
+ {Returns the transparency mode used by this png}
+ property TransparencyMode: TPNGTransparencyMode read GetTransparencyMode;
+ {Assigns from another object}
+ procedure Assign(Source: TPersistent);{$IFDEF UseDelphi}override;{$ENDIF}
+ {Assigns to another object}
+ procedure AssignTo(Dest: TPersistent);{$IFDEF UseDelphi}override;{$ENDIF}
+ {Assigns from a windows bitmap handle}
+ procedure AssignHandle(Handle: HBitmap; Transparent: Boolean;
+ TransparentColor: ColorRef);
+ {Draws the image into a canvas}
+ procedure Draw(ACanvas: TCanvas; const Rect: TRect);
+ {$IFDEF UseDelphi}override;{$ENDIF}
+ {Width and height properties}
+ property Width: Integer read GetWidth;
+ property Height: Integer read GetHeight;
+ {Returns if the image is interlaced}
+ property InterlaceMethod: TInterlaceMethod read fInterlaceMethod
+ write fInterlaceMethod;
+ {Filters to test to encode}
+ property Filters: TFilters read fFilters write fFilters;
+ {Maximum size for IDAT chunks, default and minimum is 65536}
+ property MaxIdatSize: Cardinal read fMaxIdatSize write SetMaxIdatSize;
+ {Property to return if the image is empty or not}
+ property Empty: Boolean read GetEmpty;
+ {Compression level}
+ property CompressionLevel: TCompressionLevel read fCompressionLevel
+ write fCompressionLevel;
+ {Access to the chunk list}
+ property Chunks: TPngList read fChunkList;
+ {Object being created and destroyed}
+ constructor Create; {$IFDEF UseDelphi}override;{$ENDIF}
+ destructor Destroy; override;
+ {$IFNDEF UseDelphi}procedure LoadFromFile(const Filename: String);{$ENDIF}
+ {$IFNDEF UseDelphi}procedure SaveToFile(const Filename: String);{$ENDIF}
+ procedure LoadFromStream(Stream: TStream); {$IFDEF UseDelphi}override;{$ENDIF}
+ procedure SaveToStream(Stream: TStream); {$IFDEF UseDelphi}override;{$ENDIF}
+ {Loading the image from resources}
+ procedure LoadFromResourceName(Instance: HInst; const Name: String);
+ procedure LoadFromResourceID(Instance: HInst; ResID: Integer);
+ {Access to the png pixels}
+ property Pixels[const X, Y: Integer]: TColor read GetPixels write SetPixels;
+ {Palette property}
+ {THANY: Palette is now writeable}
+ {$IFNDEF UseDelphi}property Palette: HPalette read GetPalette write SetPalette;{$ENDIF}
+ end;
+
+ {Chunk name object}
+ TChunkName = Array[0..3] of Char;
+
+ {Global chunk object}
+ TChunk = class
+ private
+ {Contains data}
+ fData: Pointer;
+ fDataSize: Cardinal;
+ {Stores owner}
+ fOwner: TPngObject;
+ {Stores the chunk name}
+ fName: TChunkName;
+ {Returns pointer to the TChunkIHDR}
+ function GetHeader: TChunkIHDR;
+ {Used with property index}
+ function GetIndex: Integer;
+ {Should return chunk class/name}
+ class function GetName: String; virtual;
+ {Returns the chunk name}
+ function GetChunkName: String;
+ public
+ {Returns index from list}
+ property Index: Integer read GetIndex;
+ {Returns pointer to the TChunkIHDR}
+ property Header: TChunkIHDR read GetHeader;
+ {Resize the data}
+ procedure ResizeData(const NewSize: Cardinal);
+ {Returns data and size}
+ property Data: Pointer read fData;
+ property DataSize: Cardinal read fDataSize;
+ {Assigns from another TChunk}
+ procedure Assign(Source: TChunk); virtual;
+ {Returns owner}
+ property Owner: TPngObject read fOwner;
+ {Being destroyed/created}
+ constructor Create(Owner: TPngObject); virtual;
+ destructor Destroy; override;
+ {Returns chunk class/name}
+ property Name: String read GetChunkName;
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; virtual;
+ {Saves the chunk to a stream}
+ function SaveData(Stream: TStream): Boolean;
+ function SaveToStream(Stream: TStream): Boolean; virtual;
+ end;
+
+ {Chunk classes}
+ TChunkIEND = class(TChunk); {End chunk}
+
+ {IHDR data}
+ pIHDRData = ^TIHDRData;
+ TIHDRData = packed record
+ Width, Height: Cardinal;
+ BitDepth,
+ ColorType,
+ CompressionMethod,
+ FilterMethod,
+ InterlaceMethod: Byte;
+ end;
+
+ {Information header chunk}
+ TChunkIHDR = class(TChunk)
+ private
+ {Current image}
+ ImageHandle: HBitmap;
+ ImageDC: HDC;
+
+ {Output windows bitmap}
+ HasPalette: Boolean;
+ BitmapInfo: TMaxBitmapInfo;
+ BytesPerRow: Integer;
+ {Stores the image bytes}
+ {$IFDEF Store16bits}ExtraImageData: Pointer;{$ENDIF}
+ ImageData: pointer;
+ ImageAlpha: Pointer;
+
+ {Contains all the ihdr data}
+ IHDRData: TIHDRData;
+ protected
+ {Resizes the image data to fill the color type, bit depth, }
+ {width and height parameters}
+ procedure PrepareImageData;
+ {Release allocated ImageData memory}
+ procedure FreeImageData;
+ public
+ {Properties}
+ property Width: Cardinal read IHDRData.Width write IHDRData.Width;
+ property Height: Cardinal read IHDRData.Height write IHDRData.Height;
+ property BitDepth: Byte read IHDRData.BitDepth write IHDRData.BitDepth;
+ property ColorType: Byte read IHDRData.ColorType write IHDRData.ColorType;
+ property CompressionMethod: Byte read IHDRData.CompressionMethod
+ write IHDRData.CompressionMethod;
+ property FilterMethod: Byte read IHDRData.FilterMethod
+ write IHDRData.FilterMethod;
+ property InterlaceMethod: Byte read IHDRData.InterlaceMethod
+ write IHDRData.InterlaceMethod;
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Saves the chunk to a stream}
+ function SaveToStream(Stream: TStream): Boolean; override;
+ {Destructor/constructor}
+ constructor Create(Owner: TPngObject); override;
+ destructor Destroy; override;
+ {Assigns from another TChunk}
+ procedure Assign(Source: TChunk); override;
+ end;
+
+ {Gamma chunk}
+ TChunkgAMA = class(TChunk)
+ private
+ {Returns/sets the value for the gamma chunk}
+ function GetValue: Cardinal;
+ procedure SetValue(const Value: Cardinal);
+ public
+ {Returns/sets gamma value}
+ property Gamma: Cardinal read GetValue write SetValue;
+ {Loading the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Being created}
+ constructor Create(Owner: TPngObject); override;
+ {Assigns from another TChunk}
+ procedure Assign(Source: TChunk); override;
+ end;
+
+ {ZLIB Decompression extra information}
+ TZStreamRec2 = packed record
+ {From ZLIB}
+ ZLIB: TZStreamRec;
+ {Additional info}
+ Data: Pointer;
+ fStream : TStream;
+ end;
+
+ {Palette chunk}
+ TChunkPLTE = class(TChunk)
+ private
+ {Number of items in the palette}
+ fCount: Integer;
+ {Contains the palette handle}
+ function GetPaletteItem(Index: Byte): TRGBQuad;
+ public
+ {Returns the color for each item in the palette}
+ property Item[Index: Byte]: TRGBQuad read GetPaletteItem;
+ {Returns the number of items in the palette}
+ property Count: Integer read fCount;
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Saves the chunk to a stream}
+ function SaveToStream(Stream: TStream): Boolean; override;
+ {Assigns from another TChunk}
+ procedure Assign(Source: TChunk); override;
+ end;
+
+ {Transparency information}
+ TChunktRNS = class(TChunk)
+ private
+ fBitTransparency: Boolean;
+ function GetTransparentColor: ColorRef;
+ {Returns the transparent color}
+ procedure SetTransparentColor(const Value: ColorRef);
+ public
+ {Palette values for transparency}
+ PaletteValues: Array[Byte] of Byte;
+ {Returns if it uses bit transparency}
+ property BitTransparency: Boolean read fBitTransparency;
+ {Returns the transparent color}
+ property TransparentColor: ColorRef read GetTransparentColor write
+ SetTransparentColor;
+ {Loads/saves the chunk from/to a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ function SaveToStream(Stream: TStream): Boolean; override;
+ {Assigns from another TChunk}
+ procedure Assign(Source: TChunk); override;
+ end;
+
+ {Actual image information}
+ TChunkIDAT = class(TChunk)
+ private
+ {Holds another pointer to the TChunkIHDR}
+ Header: TChunkIHDR;
+ {Stores temporary image width and height}
+ ImageWidth, ImageHeight: Integer;
+ {Size in bytes of each line and offset}
+ Row_Bytes, Offset : Cardinal;
+ {Contains data for the lines}
+ Encode_Buffer: Array[0..5] of pByteArray;
+ Row_Buffer: Array[Boolean] of pByteArray;
+ {Variable to invert the Row_Buffer used}
+ RowUsed: Boolean;
+ {Ending position for the current IDAT chunk}
+ EndPos: Integer;
+ {Filter the current line}
+ procedure FilterRow;
+ {Filter to encode and returns the best filter}
+ function FilterToEncode: Byte;
+ {Reads ZLIB compressed data}
+ function IDATZlibRead(var ZLIBStream: TZStreamRec2; Buffer: Pointer;
+ Count: Integer; var EndPos: Integer; var crcfile: Cardinal): Integer;
+ {Compress and writes IDAT data}
+ procedure IDATZlibWrite(var ZLIBStream: TZStreamRec2; Buffer: Pointer;
+ const Length: Cardinal);
+ procedure FinishIDATZlib(var ZLIBStream: TZStreamRec2);
+ {Prepares the palette}
+ procedure PreparePalette;
+ protected
+ {Decode interlaced image}
+ procedure DecodeInterlacedAdam7(Stream: TStream;
+ var ZLIBStream: TZStreamRec2; const Size: Integer; var crcfile: Cardinal);
+ {Decode non interlaced imaged}
+ procedure DecodeNonInterlaced(Stream: TStream;
+ var ZLIBStream: TZStreamRec2; const Size: Integer;
+ var crcfile: Cardinal);
+ protected
+ {Encode non interlaced images}
+ procedure EncodeNonInterlaced(Stream: TStream;
+ var ZLIBStream: TZStreamRec2);
+ {Encode interlaced images}
+ procedure EncodeInterlacedAdam7(Stream: TStream;
+ var ZLIBStream: TZStreamRec2);
+ protected
+ {Memory copy methods to decode}
+ procedure CopyNonInterlacedRGB8(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedRGB16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedPalette148(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedPalette2(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedGray2(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedGrayscale16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedRGBAlpha8(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedRGBAlpha16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedGrayscaleAlpha8(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyNonInterlacedGrayscaleAlpha16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedRGB8(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedRGB16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedPalette148(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedPalette2(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedGray2(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedGrayscale16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedRGBAlpha8(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedRGBAlpha16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedGrayscaleAlpha8(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ procedure CopyInterlacedGrayscaleAlpha16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+ protected
+ {Memory copy methods to encode}
+ procedure EncodeNonInterlacedRGB8(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedRGB16(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedGrayscale16(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedPalette148(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedRGBAlpha8(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedRGBAlpha16(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedGrayscaleAlpha8(Src, Dest, Trans: pChar);
+ procedure EncodeNonInterlacedGrayscaleAlpha16(Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedRGB8(const Pass: Byte; Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedRGB16(const Pass: Byte; Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedPalette148(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedGrayscale16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedRGBAlpha8(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedRGBAlpha16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedGrayscaleAlpha8(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+ procedure EncodeInterlacedGrayscaleAlpha16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+ public
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Saves the chunk to a stream}
+ function SaveToStream(Stream: TStream): Boolean; override;
+ end;
+
+ {Image last modification chunk}
+ TChunktIME = class(TChunk)
+ private
+ {Holds the variables}
+ fYear: Word;
+ fMonth, fDay, fHour, fMinute, fSecond: Byte;
+ public
+ {Returns/sets variables}
+ property Year: Word read fYear write fYear;
+ property Month: Byte read fMonth write fMonth;
+ property Day: Byte read fDay write fDay;
+ property Hour: Byte read fHour write fHour;
+ property Minute: Byte read fMinute write fMinute;
+ property Second: Byte read fSecond write fSecond;
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Saves the chunk to a stream}
+ function SaveToStream(Stream: TStream): Boolean; override;
+ end;
+
+ {Textual data}
+ TChunktEXt = class(TChunk)
+ private
+ fKeyword, fText: String;
+ public
+ {Keyword and text}
+ property Keyword: String read fKeyword write fKeyword;
+ property Text: String read fText write fText;
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Saves the chunk to a stream}
+ function SaveToStream(Stream: TStream): Boolean; override;
+ {Assigns from another TChunk}
+ procedure Assign(Source: TChunk); override;
+ end;
+
+ {zTXT chunk}
+ TChunkzTXt = class(TChunktEXt)
+ {Loads the chunk from a stream}
+ function LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean; override;
+ {Saves the chunk to a stream}
+ function SaveToStream(Stream: TStream): Boolean; override;
+ end;
+
+{Here we test if it's c++ builder or delphi version 3 or less}
+{$IFDEF VER110}{$DEFINE DelphiBuilder3Less}{$ENDIF}
+{$IFDEF VER100}{$DEFINE DelphiBuilder3Less}{$ENDIF}
+{$IFDEF VER93}{$DEFINE DelphiBuilder3Less}{$ENDIF}
+{$IFDEF VER90}{$DEFINE DelphiBuilder3Less}{$ENDIF}
+{$IFDEF VER80}{$DEFINE DelphiBuilder3Less}{$ENDIF}
+
+
+{Registers a new chunk class}
+procedure RegisterChunk(ChunkClass: TChunkClass);
+{Calculates crc}
+function update_crc(crc: {$IFNDEF DelphiBuilder3Less}Cardinal{$ELSE}Integer
+ {$ENDIF}; buf: pByteArray; len: Integer): Cardinal;
+{Invert bytes using assembly}
+function ByteSwap(const a: integer): integer;
+
+implementation
+
+var
+ ChunkClasses: TPngPointerList;
+ {Table of CRCs of all 8-bit messages}
+ crc_table: Array[0..255] of Cardinal;
+ {Flag: has the table been computed? Initially false}
+ crc_table_computed: Boolean;
+
+{Draw transparent image using transparent color}
+procedure DrawTransparentBitmap(dc: HDC; srcBits: Pointer;
+ var srcHeader: TBitmapInfoHeader;
+ srcBitmapInfo: pBitmapInfo; Rect: TRect; cTransparentColor: COLORREF);
+var
+ cColor: COLORREF;
+ bmAndBack, bmAndObject, bmAndMem: HBITMAP;
+ bmBackOld, bmObjectOld, bmMemOld: HBITMAP;
+ hdcMem, hdcBack, hdcObject, hdcTemp: HDC;
+ ptSize, orgSize: TPOINT;
+ OldBitmap, DrawBitmap: HBITMAP;
+begin
+ hdcTemp := CreateCompatibleDC(dc);
+ // Select the bitmap
+ DrawBitmap := CreateDIBitmap(dc, srcHeader, CBM_INIT, srcBits, srcBitmapInfo^,
+ DIB_RGB_COLORS);
+ OldBitmap := SelectObject(hdcTemp, DrawBitmap);
+
+ // Sizes
+ OrgSize.x := abs(srcHeader.biWidth);
+ OrgSize.y := abs(srcHeader.biHeight);
+ ptSize.x := Rect.Right - Rect.Left; // Get width of bitmap
+ ptSize.y := Rect.Bottom - Rect.Top; // Get height of bitmap
+
+ // Create some DCs to hold temporary data.
+ hdcBack := CreateCompatibleDC(dc);
+ hdcObject := CreateCompatibleDC(dc);
+ hdcMem := CreateCompatibleDC(dc);
+
+ // Create a bitmap for each DC. DCs are required for a number of
+ // GDI functions.
+
+ // Monochrome DCs
+ bmAndBack := CreateBitmap(ptSize.x, ptSize.y, 1, 1, nil);
+ bmAndObject := CreateBitmap(ptSize.x, ptSize.y, 1, 1, nil);
+
+ bmAndMem := CreateCompatibleBitmap(dc, ptSize.x, ptSize.y);
+
+ // Each DC must select a bitmap object to store pixel data.
+ bmBackOld := SelectObject(hdcBack, bmAndBack);
+ bmObjectOld := SelectObject(hdcObject, bmAndObject);
+ bmMemOld := SelectObject(hdcMem, bmAndMem);
+
+ // Set the background color of the source DC to the color.
+ // contained in the parts of the bitmap that should be transparent
+ cColor := SetBkColor(hdcTemp, cTransparentColor);
+
+ // Create the object mask for the bitmap by performing a BitBlt
+ // from the source bitmap to a monochrome bitmap.
+ StretchBlt(hdcObject, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0,
+ orgSize.x, orgSize.y, SRCCOPY);
+
+ // Set the background color of the source DC back to the original
+ // color.
+ SetBkColor(hdcTemp, cColor);
+
+ // Create the inverse of the object mask.
+ BitBlt(hdcBack, 0, 0, ptSize.x, ptSize.y, hdcObject, 0, 0,
+ NOTSRCCOPY);
+
+ // Copy the background of the main DC to the destination.
+ BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, dc, Rect.Left, Rect.Top,
+ SRCCOPY);
+
+ // Mask out the places where the bitmap will be placed.
+ BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcObject, 0, 0, SRCAND);
+
+ // Mask out the transparent colored pixels on the bitmap.
+// BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcBack, 0, 0, SRCAND);
+ StretchBlt(hdcTemp, 0, 0, OrgSize.x, OrgSize.y, hdcBack, 0, 0,
+ PtSize.x, PtSize.y, SRCAND);
+
+ // XOR the bitmap with the background on the destination DC.
+ StretchBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0,
+ OrgSize.x, OrgSize.y, SRCPAINT);
+
+ // Copy the destination to the screen.
+ BitBlt(dc, Rect.Left, Rect.Top, ptSize.x, ptSize.y, hdcMem, 0, 0,
+ SRCCOPY);
+
+ // Delete the memory bitmaps.
+ DeleteObject(SelectObject(hdcBack, bmBackOld));
+ DeleteObject(SelectObject(hdcObject, bmObjectOld));
+ DeleteObject(SelectObject(hdcMem, bmMemOld));
+ DeleteObject(SelectObject(hdcTemp, OldBitmap));
+
+ // Delete the memory DCs.
+ DeleteDC(hdcMem);
+ DeleteDC(hdcBack);
+ DeleteDC(hdcObject);
+ DeleteDC(hdcTemp);
+end;
+
+{Make the table for a fast CRC.}
+procedure make_crc_table;
+var
+ c: Cardinal;
+ n, k: Integer;
+begin
+
+ {fill the crc table}
+ for n := 0 to 255 do
+ begin
+ c := Cardinal(n);
+ for k := 0 to 7 do
+ begin
+ if Boolean(c and 1) then
+ c := $edb88320 xor (c shr 1)
+ else
+ c := c shr 1;
+ end;
+ crc_table[n] := c;
+ end;
+
+ {The table has already being computated}
+ crc_table_computed := true;
+end;
+
+{Update a running CRC with the bytes buf[0..len-1]--the CRC
+ should be initialized to all 1's, and the transmitted value
+ is the 1's complement of the final running CRC (see the
+ crc() routine below)).}
+function update_crc(crc: {$IFNDEF DelphiBuilder3Less}Cardinal{$ELSE}Integer
+ {$ENDIF}; buf: pByteArray; len: Integer): Cardinal;
+var
+ c: Cardinal;
+ n: Integer;
+begin
+ c := crc;
+
+ {Create the crc table in case it has not being computed yet}
+ if not crc_table_computed then make_crc_table;
+
+ {Update}
+ for n := 0 to len - 1 do
+ c := crc_table[(c XOR buf^[n]) and $FF] XOR (c shr 8);
+
+ {Returns}
+ Result := c;
+end;
+
+{$IFNDEF UseDelphi}
+ function FileExists(Filename: String): Boolean;
+ var
+ FindFile: THandle;
+ FindData: TWin32FindData;
+ begin
+ FindFile := FindFirstFile(PChar(Filename), FindData);
+ Result := FindFile <> INVALID_HANDLE_VALUE;
+ if Result then Windows.FindClose(FindFile);
+ end;
+
+
+{$ENDIF}
+
+{$IFNDEF UseDelphi}
+ {Exception implementation}
+ constructor Exception.Create(Msg: String);
+ begin
+ end;
+{$ENDIF}
+
+{Calculates the paeth predictor}
+function PaethPredictor(a, b, c: Byte): Byte;
+var
+ pa, pb, pc: Integer;
+begin
+ { a = left, b = above, c = upper left }
+ pa := abs(b - c); { distances to a, b, c }
+ pb := abs(a - c);
+ pc := abs(a + b - c * 2);
+
+ { return nearest of a, b, c, breaking ties in order a, b, c }
+ if (pa <= pb) and (pa <= pc) then
+ Result := a
+ else
+ if pb <= pc then
+ Result := b
+ else
+ Result := c;
+end;
+
+{Invert bytes using assembly}
+function ByteSwap(const a: integer): integer;
+asm
+ bswap eax
+end;
+function ByteSwap16(inp:word): word;
+asm
+ bswap eax
+ shr eax, 16
+end;
+
+{Calculates number of bytes for the number of pixels using the}
+{color mode in the paramenter}
+function BytesForPixels(const Pixels: Integer; const ColorType,
+ BitDepth: Byte): Integer;
+begin
+ case ColorType of
+ {Palette and grayscale contains a single value, for palette}
+ {an value of size 2^bitdepth pointing to the palette index}
+ {and grayscale the value from 0 to 2^bitdepth with color intesity}
+ COLOR_GRAYSCALE, COLOR_PALETTE:
+ Result := (Pixels * BitDepth + 7) div 8;
+ {RGB contains 3 values R, G, B with size 2^bitdepth each}
+ COLOR_RGB:
+ Result := (Pixels * BitDepth * 3) div 8;
+ {Contains one value followed by alpha value booth size 2^bitdepth}
+ COLOR_GRAYSCALEALPHA:
+ Result := (Pixels * BitDepth * 2) div 8;
+ {Contains four values size 2^bitdepth, Red, Green, Blue and alpha}
+ COLOR_RGBALPHA:
+ Result := (Pixels * BitDepth * 4) div 8;
+ else
+ Result := 0;
+ end {case ColorType}
+end;
+
+type
+ pChunkClassInfo = ^TChunkClassInfo;
+ TChunkClassInfo = record
+ ClassName: TChunkClass;
+ end;
+
+{Register a chunk type}
+procedure RegisterChunk(ChunkClass: TChunkClass);
+var
+ NewClass: pChunkClassInfo;
+begin
+ {In case the list object has not being created yet}
+ if ChunkClasses = nil then ChunkClasses := TPngPointerList.Create(nil);
+
+ {Add this new class}
+ new(NewClass);
+ NewClass^.ClassName := ChunkClass;
+ ChunkClasses.Add(NewClass);
+end;
+
+{Free chunk class list}
+procedure FreeChunkClassList;
+var
+ i: Integer;
+begin
+ if (ChunkClasses <> nil) then
+ begin
+ FOR i := 0 TO ChunkClasses.Count - 1 do
+ Dispose(pChunkClassInfo(ChunkClasses.Item[i]));
+ ChunkClasses.Free;
+ end;
+end;
+
+{Registering of common chunk classes}
+procedure RegisterCommonChunks;
+begin
+ {Important chunks}
+ RegisterChunk(TChunkIEND);
+ RegisterChunk(TChunkIHDR);
+ RegisterChunk(TChunkIDAT);
+ RegisterChunk(TChunkPLTE);
+ RegisterChunk(TChunkgAMA);
+ RegisterChunk(TChunktRNS);
+
+ {Not so important chunks}
+ RegisterChunk(TChunktIME);
+ RegisterChunk(TChunktEXt);
+ RegisterChunk(TChunkzTXt);
+end;
+
+{Creates a new chunk of this class}
+function CreateClassChunk(Owner: TPngObject; Name: TChunkName): TChunk;
+var
+ i : Integer;
+ NewChunk: TChunkClass;
+begin
+ {Looks for this chunk}
+ NewChunk := TChunk; {In case there is no registered class for this}
+
+ {Looks for this class in all registered chunks}
+ if Assigned(ChunkClasses) then
+ FOR i := 0 TO ChunkClasses.Count - 1 DO
+ begin
+ if pChunkClassInfo(ChunkClasses.Item[i])^.ClassName.GetName = Name then
+ begin
+ NewChunk := pChunkClassInfo(ChunkClasses.Item[i])^.ClassName;
+ break;
+ end;
+ end;
+
+ {Returns chunk class}
+ Result := NewChunk.Create(Owner);
+ Result.fName := Name;
+end;
+
+{ZLIB support}
+
+const
+ ZLIBAllocate = High(Word);
+
+{Initializes ZLIB for decompression}
+function ZLIBInitInflate(Stream: TStream): TZStreamRec2;
+begin
+ {Fill record}
+ Fillchar(Result, SIZEOF(TZStreamRec2), #0);
+
+ {Set internal record information}
+ with Result do
+ begin
+ GetMem(Data, ZLIBAllocate);
+ fStream := Stream;
+ end;
+
+ {Init decompression}
+ InflateInit_(Result.zlib, zlib_version, SIZEOF(TZStreamRec));
+end;
+
+{Initializes ZLIB for compression}
+function ZLIBInitDeflate(Stream: TStream;
+ Level: TCompressionlevel; Size: Cardinal): TZStreamRec2;
+begin
+ {Fill record}
+ Fillchar(Result, SIZEOF(TZStreamRec2), #0);
+
+ {Set internal record information}
+ with Result, ZLIB do
+ begin
+ GetMem(Data, Size);
+ fStream := Stream;
+ next_out := Data;
+ avail_out := Size;
+ end;
+
+ {Inits compression}
+ deflateInit_(Result.zlib, Level, zlib_version, sizeof(TZStreamRec));
+end;
+
+{Terminates ZLIB for compression}
+procedure ZLIBTerminateDeflate(var ZLIBStream: TZStreamRec2);
+begin
+ {Terminates decompression}
+ DeflateEnd(ZLIBStream.zlib);
+ {Free internal record}
+ FreeMem(ZLIBStream.Data, ZLIBAllocate);
+end;
+
+{Terminates ZLIB for decompression}
+procedure ZLIBTerminateInflate(var ZLIBStream: TZStreamRec2);
+begin
+ {Terminates decompression}
+ InflateEnd(ZLIBStream.zlib);
+ {Free internal record}
+ FreeMem(ZLIBStream.Data, ZLIBAllocate);
+end;
+
+{Decompresses ZLIB into a memory address}
+function DecompressZLIB(const Input: Pointer; InputSize: Integer;
+ var Output: Pointer; var OutputSize: Integer;
+ var ErrorOutput: String): Boolean;
+var
+ StreamRec : TZStreamRec;
+ Buffer : Array[Byte] of Byte;
+ InflateRet: Integer;
+begin
+ with StreamRec do
+ begin
+ {Initializes}
+ Result := True;
+ OutputSize := 0;
+
+ {Prepares the data to decompress}
+ FillChar(StreamRec, SizeOf(TZStreamRec), #0);
+ InflateInit_(StreamRec, zlib_version, SIZEOF(TZStreamRec));
+ next_in := Input;
+ avail_in := InputSize;
+
+ {Decodes data}
+ repeat
+ {In case it needs an output buffer}
+ if (avail_out = 0) then
+ begin
+ next_out := @Buffer;
+ avail_out := SizeOf(Buffer);
+ end {if (avail_out = 0)};
+
+ {Decompress and put in output}
+ InflateRet := inflate(StreamRec, 0);
+ if (InflateRet = Z_STREAM_END) or (InflateRet = 0) then
+ begin
+ {Reallocates output buffer}
+ inc(OutputSize, total_out);
+ if Output = nil then
+ GetMem(Output, OutputSize) else ReallocMem(Output, OutputSize);
+ {Copies the new data}
+ CopyMemory(Ptr(Longint(Output) + OutputSize - total_out),
+ @Buffer, total_out);
+ end {if (InflateRet = Z_STREAM_END) or (InflateRet = 0)}
+ {Now tests for errors}
+ else if InflateRet < 0 then
+ begin
+ Result := False;
+ ErrorOutput := StreamRec.msg;
+ InflateEnd(StreamRec);
+ Exit;
+ end {if InflateRet < 0}
+ until InflateRet = Z_STREAM_END;
+
+ {Terminates decompression}
+ InflateEnd(StreamRec);
+ end {with StreamRec}
+
+end;
+
+{Compresses ZLIB into a memory address}
+function CompressZLIB(Input: Pointer; InputSize, CompressionLevel: Integer;
+ var Output: Pointer; var OutputSize: Integer;
+ var ErrorOutput: String): Boolean;
+var
+ StreamRec : TZStreamRec;
+ Buffer : Array[Byte] of Byte;
+ DeflateRet: Integer;
+begin
+ with StreamRec do
+ begin
+ Result := True; {By default returns TRUE as everything might have gone ok}
+ OutputSize := 0; {Initialize}
+ {Prepares the data to compress}
+ FillChar(StreamRec, SizeOf(TZStreamRec), #0);
+ DeflateInit_(StreamRec, CompressionLevel,zlib_version, SIZEOF(TZStreamRec));
+
+ next_in := Input;
+ avail_in := InputSize;
+
+ while avail_in > 0 do
+ begin
+ {When it needs new buffer to stores the compressed data}
+ if avail_out = 0 then
+ begin
+ {Restore buffer}
+ next_out := @Buffer;
+ avail_out := SizeOf(Buffer);
+ end {if avail_out = 0};
+
+ {Compresses}
+ DeflateRet := deflate(StreamRec, Z_FINISH);
+
+ if (DeflateRet = Z_STREAM_END) or (DeflateRet = 0) then
+ begin
+ {Updates the output memory}
+ inc(OutputSize, total_out);
+ if Output = nil then
+ GetMem(Output, OutputSize) else ReallocMem(Output, OutputSize);
+
+ {Copies the new data}
+ CopyMemory(Ptr(Longint(Output) + OutputSize - total_out),
+ @Buffer, total_out);
+ end {if (InflateRet = Z_STREAM_END) or (InflateRet = 0)}
+ {Now tests for errors}
+ else if DeflateRet < 0 then
+ begin
+ Result := False;
+ ErrorOutput := StreamRec.msg;
+ DeflateEnd(StreamRec);
+ Exit;
+ end {if InflateRet < 0}
+
+ end {while avail_in > 0};
+
+ {Finishes compressing}
+ DeflateEnd(StreamRec);
+ end {with StreamRec}
+
+end;
+
+{TPngPointerList implementation}
+
+{Object being created}
+constructor TPngPointerList.Create(AOwner: TPNGObject);
+begin
+ inherited Create; {Let ancestor work}
+ {Holds owner}
+ fOwner := AOwner;
+ {Memory pointer not being used yet}
+ fMemory := nil;
+ {No items yet}
+ fCount := 0;
+end;
+
+{Removes value from the list}
+function TPngPointerList.Remove(Value: Pointer): Pointer;
+var
+ I, Position: Integer;
+begin
+ {Gets item position}
+ Position := -1;
+ FOR I := 0 TO Count - 1 DO
+ if Value = Item[I] then Position := I;
+ {In case a match was found}
+ if Position >= 0 then
+ begin
+ Result := Item[Position]; {Returns pointer}
+ {Remove item and move memory}
+ Dec(fCount);
+ if Position < Integer(FCount) then
+ System.Move(fMemory^[Position + 1], fMemory^[Position],
+ (Integer(fCount) - Position) * SizeOf(Pointer));
+ end {if Position >= 0} else Result := nil
+end;
+
+{Add a new value in the list}
+procedure TPngPointerList.Add(Value: Pointer);
+begin
+ Count := Count + 1;
+ Item[Count - 1] := Value;
+end;
+
+
+{Object being destroyed}
+destructor TPngPointerList.Destroy;
+begin
+ {Release memory if needed}
+ if fMemory <> nil then
+ FreeMem(fMemory, fCount * sizeof(Pointer));
+
+ {Free things}
+ inherited Destroy;
+end;
+
+{Returns one item from the list}
+function TPngPointerList.GetItem(Index: Cardinal): Pointer;
+begin
+ if (Index <= Count - 1) then
+ Result := fMemory[Index]
+ else
+ {In case it's out of bounds}
+ Result := nil;
+end;
+
+{Inserts a new item in the list}
+procedure TPngPointerList.Insert(Value: Pointer; Position: Cardinal);
+begin
+ if (Position < Count) then
+ begin
+ {Increase item count}
+ SetSize(Count + 1);
+ {Move other pointers}
+ if Position < Count then
+ System.Move(fMemory^[Position], fMemory^[Position + 1],
+ (Count - Position - 1) * SizeOf(Pointer));
+ {Sets item}
+ Item[Position] := Value;
+ end;
+end;
+
+{Sets one item from the list}
+procedure TPngPointerList.SetItem(Index: Cardinal; const Value: Pointer);
+begin
+ {If index is in bounds, set value}
+ if (Index <= Count - 1) then
+ fMemory[Index] := Value
+end;
+
+{This method resizes the list}
+procedure TPngPointerList.SetSize(const Size: Cardinal);
+begin
+ {Sets the size}
+ if (fMemory = nil) and (Size > 0) then
+ GetMem(fMemory, Size * SIZEOF(Pointer))
+ else
+ if Size > 0 then {Only realloc if the new size is greater than 0}
+ ReallocMem(fMemory, Size * SIZEOF(Pointer))
+ else
+ {In case user is resize to 0 items}
+ begin
+ FreeMem(fMemory);
+ fMemory := nil;
+ end;
+ {Update count}
+ fCount := Size;
+end;
+
+{TPNGList implementation}
+
+{Removes an item}
+procedure TPNGList.RemoveChunk(Chunk: TChunk);
+begin
+ Remove(Chunk);
+ Chunk.Free
+end;
+
+{Add a new item}
+function TPNGList.Add(ChunkClass: TChunkClass): TChunk;
+var
+ IHDR: TChunkIHDR;
+ IEND: TChunkIEND;
+
+ IDAT: TChunkIDAT;
+ PLTE: TChunkPLTE;
+begin
+ Result := nil; {Default result}
+ {Adding these is not allowed}
+ if (ChunkClass = TChunkIHDR) or (ChunkClass = TChunkIDAT) or
+ (ChunkClass = TChunkPLTE) or (ChunkClass = TChunkIEND) then
+ fOwner.RaiseError(EPngError, EPNGCannotAddChunkText)
+ {Two of these is not allowed}
+ else if ((ChunkClass = TChunkgAMA) and (ItemFromClass(TChunkgAMA) <> nil)) or
+ ((ChunkClass = TChunktRNS) and (ItemFromClass(TChunktRNS) <> nil)) then
+ fOwner.RaiseError(EPngError, EPNGCannotAddChunkText)
+ {There must have an IEND and IHDR chunk}
+ else if (ItemFromClass(TChunkIEND) = nil) or
+ (ItemFromClass(TChunkIHDR) = nil) then
+ fOwner.RaiseError(EPngError, EPNGCannotAddInvalidImageText)
+ else
+ begin
+ {Get common chunks}
+ IHDR := ItemFromClass(TChunkIHDR) as TChunkIHDR;
+ IEND := ItemFromClass(TChunkIEND) as TChunkIEND;
+ {Create new chunk}
+ Result := ChunkClass.Create(Owner);
+ {Add to the list}
+ if (ChunkClass = TChunkgAMA) then
+ Insert(Result, IHDR.Index + 1)
+ {Transparency chunk (fix by Ian Boyd)}
+ else if (ChunkClass = TChunktRNS) then
+ begin
+ {Transparecy chunk must be after PLTE; before IDAT}
+ IDAT := ItemFromClass(TChunkIDAT) as TChunkIDAT;
+ PLTE := ItemFromClass(TChunkPLTE) as TChunkPLTE;
+
+ if Assigned(PLTE) then
+ Insert(Result, PLTE.Index + 1)
+ else if Assigned(IDAT) then
+ Insert(Result, IDAT.Index)
+ else
+ Insert(Result, IHDR.Index + 1)
+ end
+ else {All other chunks}
+ Insert(Result, IEND.Index);
+ end {if}
+end;
+
+{Returns item from the list}
+function TPNGList.GetItem(Index: Cardinal): TChunk;
+begin
+ Result := inherited GetItem(Index);
+end;
+
+{Returns first item from the list using the class from parameter}
+function TPNGList.ItemFromClass(ChunkClass: TChunkClass): TChunk;
+var
+ i: Integer;
+begin
+ Result := nil; {Initial result}
+ FOR i := 0 TO Count - 1 DO
+ {Test if this item has the same class}
+ if Item[i] is ChunkClass then
+ begin
+ {Returns this item and exit}
+ Result := Item[i];
+ break;
+ end {if}
+end;
+
+{$IFNDEF UseDelphi}
+
+ {TStream implementation}
+
+ {Copies all from another stream}
+ function TStream.CopyFrom(Source: TStream; Count: Cardinal): Cardinal;
+ const
+ MaxBytes = $f000;
+ var
+ Buffer: PChar;
+ BufSize, N: Cardinal;
+ begin
+ {If count is zero, copy everything from Source}
+ if Count = 0 then
+ begin
+ Source.Seek(0, soFromBeginning);
+ Count := Source.Size;
+ end;
+
+ Result := Count; {Returns the number of bytes readed}
+ {Allocates memory}
+ if Count > MaxBytes then BufSize := MaxBytes else BufSize := Count;
+ GetMem(Buffer, BufSize);
+
+ {Copy memory}
+ while Count > 0 do
+ begin
+ if Count > BufSize then N := BufSize else N := Count;
+ Source.Read(Buffer^, N);
+ Write(Buffer^, N);
+ dec(Count, N);
+ end;
+
+ {Deallocates memory}
+ FreeMem(Buffer, BufSize);
+ end;
+
+{Set current stream position}
+procedure TStream.SetPosition(const Value: Longint);
+begin
+ Seek(Value, soFromBeginning);
+end;
+
+{Returns position}
+function TStream.GetPosition: Longint;
+begin
+ Result := Seek(0, soFromCurrent);
+end;
+
+ {Returns stream size}
+function TStream.GetSize: Longint;
+ var
+ Pos: Cardinal;
+ begin
+ Pos := Seek(0, soFromCurrent);
+ Result := Seek(0, soFromEnd);
+ Seek(Pos, soFromCurrent);
+ end;
+
+ {TFileStream implementation}
+
+ {Filestream object being created}
+ constructor TFileStream.Create(Filename: String; Mode: TFileStreamModeSet);
+ {Makes file mode}
+ function OpenMode: DWORD;
+ begin
+ Result := 0;
+ if fsmRead in Mode then Result := GENERIC_READ;
+ if (fsmWrite in Mode) or (fsmCreate in Mode) then
+ Result := Result OR GENERIC_WRITE;
+ end;
+ const
+ IsCreate: Array[Boolean] of Integer = (OPEN_ALWAYS, CREATE_ALWAYS);
+ begin
+ {Call ancestor}
+ inherited Create;
+
+ {Create handle}
+ fHandle := CreateFile(PChar(Filename), OpenMode, FILE_SHARE_READ or
+ FILE_SHARE_WRITE, nil, IsCreate[fsmCreate in Mode], 0, 0);
+ {Store mode}
+ FileMode := Mode;
+ end;
+
+ {Filestream object being destroyed}
+ destructor TFileStream.Destroy;
+ begin
+ {Terminates file and close}
+ if FileMode = [fsmWrite] then
+ SetEndOfFile(fHandle);
+ CloseHandle(fHandle);
+
+ {Call ancestor}
+ inherited Destroy;
+ end;
+
+ {Writes data to the file}
+ function TFileStream.Write(const Buffer; Count: Longint): Cardinal;
+ begin
+ if not WriteFile(fHandle, Buffer, Count, Result, nil) then
+ Result := 0;
+ end;
+
+ {Reads data from the file}
+ function TFileStream.Read(var Buffer; Count: Longint): Cardinal;
+ begin
+ if not ReadFile(fHandle, Buffer, Count, Result, nil) then
+ Result := 0;
+ end;
+
+ {Seeks the file position}
+ function TFileStream.Seek(Offset: Integer; Origin: Word): Longint;
+ begin
+ Result := SetFilePointer(fHandle, Offset, nil, Origin);
+ end;
+
+ {Sets the size of the file}
+ procedure TFileStream.SetSize(const Value: Longint);
+ begin
+ Seek(Value, soFromBeginning);
+ SetEndOfFile(fHandle);
+ end;
+
+ {TResourceStream implementation}
+
+ {Creates the resource stream}
+ constructor TResourceStream.Create(Instance: HInst; const ResName: String;
+ ResType: PChar);
+ var
+ ResID: HRSRC;
+ ResGlobal: HGlobal;
+ begin
+ {Obtains the resource ID}
+ ResID := FindResource(hInstance, PChar(ResName), RT_RCDATA);
+ if ResID = 0 then raise EPNGError.Create('');
+ {Obtains memory and size}
+ ResGlobal := LoadResource(hInstance, ResID);
+ Size := SizeOfResource(hInstance, ResID);
+ Memory := LockResource(ResGlobal);
+ if (ResGlobal = 0) or (Memory = nil) then EPNGError.Create('');
+ end;
+
+
+ {Setting resource stream size is not supported}
+ procedure TResourceStream.SetSize(const Value: Integer);
+ begin
+ end;
+
+ {Writing into a resource stream is not supported}
+ function TResourceStream.Write(const Buffer; Count: Integer): Cardinal;
+ begin
+ Result := 0;
+ end;
+
+ {Reads data from the stream}
+ function TResourceStream.Read(var Buffer; Count: Integer): Cardinal;
+ begin
+ //Returns data
+ CopyMemory(@Buffer, Ptr(Longint(Memory) + Position), Count);
+ //Update position
+ inc(Position, Count);
+ //Returns
+ Result := Count;
+ end;
+
+ {Seeks data}
+ function TResourceStream.Seek(Offset: Integer; Origin: Word): Longint;
+ begin
+ {Move depending on the origin}
+ case Origin of
+ soFromBeginning: Position := Offset;
+ soFromCurrent: inc(Position, Offset);
+ soFromEnd: Position := Size + Offset;
+ end;
+
+ {Returns the current position}
+ Result := Position;
+ end;
+
+{$ENDIF}
+
+{TChunk implementation}
+
+{Resizes the data}
+procedure TChunk.ResizeData(const NewSize: Cardinal);
+begin
+ fDataSize := NewSize;
+ ReallocMem(fData, NewSize + 1);
+end;
+
+{Returns index from list}
+function TChunk.GetIndex: Integer;
+var
+ i: Integer;
+begin
+ Result := -1; {Avoiding warnings}
+ {Searches in the list}
+ FOR i := 0 TO Owner.Chunks.Count - 1 DO
+ if Owner.Chunks.Item[i] = Self then
+ begin
+ {Found match}
+ Result := i;
+ exit;
+ end {for i}
+end;
+
+{Returns pointer to the TChunkIHDR}
+function TChunk.GetHeader: TChunkIHDR;
+begin
+ Result := Owner.Chunks.Item[0] as TChunkIHDR;
+end;
+
+{Assigns from another TChunk}
+procedure TChunk.Assign(Source: TChunk);
+begin
+ {Copy properties}
+ fName := Source.fName;
+ {Set data size and realloc}
+ ResizeData(Source.fDataSize);
+
+ {Copy data (if there's any)}
+ if fDataSize > 0 then CopyMemory(fData, Source.fData, fDataSize);
+end;
+
+{Chunk being created}
+constructor TChunk.Create(Owner: TPngObject);
+var
+ ChunkName: String;
+begin
+ {Ancestor create}
+ inherited Create;
+
+ {If it's a registered class, set the chunk name based on the class}
+ {name. For instance, if the class name is TChunkgAMA, the GAMA part}
+ {will become the chunk name}
+ ChunkName := Copy(ClassName, Length('TChunk') + 1, Length(ClassName));
+ if Length(ChunkName) = 4 then CopyMemory(@fName[0], @ChunkName[1], 4);
+
+ {Initialize data holder}
+ GetMem(fData, 1);
+ fDataSize := 0;
+ {Record owner}
+ fOwner := Owner;
+end;
+
+{Chunk being destroyed}
+destructor TChunk.Destroy;
+begin
+ {Free data holder}
+ FreeMem(fData, fDataSize + 1);
+ {Let ancestor destroy}
+ inherited Destroy;
+end;
+
+{Returns the chunk name 1}
+function TChunk.GetChunkName: String;
+begin
+ Result := fName
+end;
+
+{Returns the chunk name 2}
+class function TChunk.GetName: String;
+begin
+ {For avoid writing GetName for each TChunk descendent, by default for}
+ {classes which don't declare GetName, it will look for the class name}
+ {to extract the chunk kind. Example, if the class name is TChunkIEND }
+ {this method extracts and returns IEND}
+ Result := Copy(ClassName, Length('TChunk') + 1, Length(ClassName));
+end;
+
+{Saves the data to the stream}
+function TChunk.SaveData(Stream: TStream): Boolean;
+var
+ ChunkSize, ChunkCRC: Cardinal;
+begin
+ {First, write the size for the following data in the chunk}
+ ChunkSize := ByteSwap(DataSize);
+ Stream.Write(ChunkSize, 4);
+ {The chunk name}
+ Stream.Write(fName, 4);
+ {If there is data for the chunk, write it}
+ if DataSize > 0 then Stream.Write(Data^, DataSize);
+ {Calculates and write CRC}
+ ChunkCRC := update_crc($ffffffff, @fName[0], 4);
+ ChunkCRC := Byteswap(update_crc(ChunkCRC, Data, DataSize) xor $ffffffff);
+ Stream.Write(ChunkCRC, 4);
+
+ {Returns that everything went ok}
+ Result := TRUE;
+end;
+
+{Saves the chunk to the stream}
+function TChunk.SaveToStream(Stream: TStream): Boolean;
+begin
+ Result := SaveData(Stream)
+end;
+
+
+{Loads the chunk from a stream}
+function TChunk.LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean;
+var
+ CheckCRC: Cardinal;
+ {$IFDEF CheckCRC}RightCRC: Cardinal;{$ENDIF}
+begin
+ {Copies data from source}
+ ResizeData(Size);
+ if Size > 0 then Stream.Read(fData^, Size);
+ {Reads CRC}
+ Stream.Read(CheckCRC, 4);
+ CheckCrc := ByteSwap(CheckCRC);
+
+ {Check if crc readed is valid}
+ {$IFDEF CheckCRC}
+ RightCRC := update_crc($ffffffff, @ChunkName[0], 4);
+ RightCRC := update_crc(RightCRC, fData, Size) xor $ffffffff;
+ Result := RightCRC = CheckCrc;
+
+ {Handle CRC error}
+ if not Result then
+ begin
+ {In case it coult not load chunk}
+ Owner.RaiseError(EPngInvalidCRC, EPngInvalidCRCText);
+ exit;
+ end
+ {$ELSE}Result := TRUE; {$ENDIF}
+
+end;
+
+{TChunktIME implementation}
+
+{Chunk being loaded from a stream}
+function TChunktIME.LoadFromStream(Stream: TStream;
+ const ChunkName: TChunkName; Size: Integer): Boolean;
+begin
+ {Let ancestor load the data}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+ if not Result or (Size <> 7) then exit; {Size must be 7}
+
+ {Reads data}
+ fYear := ((pByte(Longint(Data) )^) * 256)+ (pByte(Longint(Data) + 1)^);
+ fMonth := pByte(Longint(Data) + 2)^;
+ fDay := pByte(Longint(Data) + 3)^;
+ fHour := pByte(Longint(Data) + 4)^;
+ fMinute := pByte(Longint(Data) + 5)^;
+ fSecond := pByte(Longint(Data) + 6)^;
+end;
+
+{Saving the chunk to a stream}
+function TChunktIME.SaveToStream(Stream: TStream): Boolean;
+begin
+ {Update data}
+ ResizeData(7); {Make sure the size is 7}
+ pWord(Data)^ := Year;
+ pByte(Longint(Data) + 2)^ := Month;
+ pByte(Longint(Data) + 3)^ := Day;
+ pByte(Longint(Data) + 4)^ := Hour;
+ pByte(Longint(Data) + 5)^ := Minute;
+ pByte(Longint(Data) + 6)^ := Second;
+
+ {Let inherited save data}
+ Result := inherited SaveToStream(Stream);
+end;
+
+{TChunkztXt implementation}
+
+{Loading the chunk from a stream}
+function TChunkzTXt.LoadFromStream(Stream: TStream;
+ const ChunkName: TChunkName; Size: Integer): Boolean;
+var
+ ErrorOutput: String;
+ CompressionMethod: Byte;
+ Output: Pointer;
+ OutputSize: Integer;
+begin
+ {Load data from stream and validate}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+ if not Result or (Size < 4) then exit;
+ fKeyword := PChar(Data); {Get keyword and compression method bellow}
+ CompressionMethod := pByte(Longint(fKeyword) + Length(fKeyword))^;
+ fText := '';
+
+ {In case the compression is 0 (only one accepted by specs), reads it}
+ if CompressionMethod = 0 then
+ begin
+ Output := nil;
+ if DecompressZLIB(PChar(Longint(Data) + Length(fKeyword) + 2),
+ Size - Length(fKeyword) - 2, Output, OutputSize, ErrorOutput) then
+ begin
+ SetLength(fText, OutputSize);
+ CopyMemory(@fText[1], Output, OutputSize);
+ end {if DecompressZLIB(...};
+ FreeMem(Output);
+ end {if CompressionMethod = 0}
+
+end;
+
+{Saving the chunk to a stream}
+function TChunkztXt.SaveToStream(Stream: TStream): Boolean;
+var
+ Output: Pointer;
+ OutputSize: Integer;
+ ErrorOutput: String;
+begin
+ Output := nil; {Initializes output}
+ if fText = '' then fText := ' ';
+
+ {Compresses the data}
+ if CompressZLIB(@fText[1], Length(fText), Owner.CompressionLevel, Output,
+ OutputSize, ErrorOutput) then
+ begin
+ {Size is length from keyword, plus a null character to divide}
+ {plus the compression method, plus the length of the text (zlib compressed)}
+ ResizeData(Length(fKeyword) + 2 + OutputSize);
+
+ Fillchar(Data^, DataSize, #0);
+ {Copies the keyword data}
+ if Keyword <> '' then
+ CopyMemory(Data, @fKeyword[1], Length(Keyword));
+ {Compression method 0 (inflate/deflate)}
+ pByte(Ptr(Longint(Data) + Length(Keyword) + 1))^ := 0;
+ if OutputSize > 0 then
+ CopyMemory(Ptr(Longint(Data) + Length(Keyword) + 2), Output, OutputSize);
+
+ {Let ancestor calculate crc and save}
+ Result := SaveData(Stream);
+ end {if CompressZLIB(...} else Result := False;
+
+ {Frees output}
+ if Output <> nil then FreeMem(Output)
+end;
+
+{TChunktEXt implementation}
+
+{Assigns from another text chunk}
+procedure TChunktEXt.Assign(Source: TChunk);
+begin
+ fKeyword := TChunktEXt(Source).fKeyword;
+ fText := TChunktEXt(Source).fText;
+end;
+
+{Loading the chunk from a stream}
+function TChunktEXt.LoadFromStream(Stream: TStream;
+ const ChunkName: TChunkName; Size: Integer): Boolean;
+begin
+ {Load data from stream and validate}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+ if not Result or (Size < 3) then exit;
+ {Get text}
+ fKeyword := PChar(Data);
+ SetLength(fText, Size - Length(fKeyword) - 1);
+ CopyMemory(@fText[1], Ptr(Longint(Data) + Length(fKeyword) + 1),
+ Length(fText));
+end;
+
+{Saving the chunk to a stream}
+function TChunktEXt.SaveToStream(Stream: TStream): Boolean;
+begin
+ {Size is length from keyword, plus a null character to divide}
+ {plus the length of the text}
+ ResizeData(Length(fKeyword) + 1 + Length(fText));
+ Fillchar(Data^, DataSize, #0);
+ {Copy data}
+ if Keyword <> '' then
+ CopyMemory(Data, @fKeyword[1], Length(Keyword));
+ if Text <> '' then
+ CopyMemory(Ptr(Longint(Data) + Length(Keyword) + 1), @fText[1],
+ Length(Text));
+ {Let ancestor calculate crc and save}
+ Result := inherited SaveToStream(Stream);
+end;
+
+
+{TChunkIHDR implementation}
+
+{Chunk being created}
+constructor TChunkIHDR.Create(Owner: TPngObject);
+begin
+ {Call inherited}
+ inherited Create(Owner);
+ {Prepare pointers}
+ ImageHandle := 0;
+ ImageDC := 0;
+end;
+
+{Chunk being destroyed}
+destructor TChunkIHDR.Destroy;
+begin
+ {Free memory}
+ FreeImageData();
+
+ {Calls TChunk destroy}
+ inherited Destroy;
+end;
+
+{Assigns from another IHDR chunk}
+procedure TChunkIHDR.Assign(Source: TChunk);
+begin
+ {Copy the IHDR data}
+ if Source is TChunkIHDR then
+ begin
+ {Copy IHDR values}
+ IHDRData := TChunkIHDR(Source).IHDRData;
+
+ {Prepare to hold data by filling BitmapInfo structure and}
+ {resizing ImageData and ImageAlpha memory allocations}
+ PrepareImageData();
+
+ {Copy image data}
+ CopyMemory(ImageData, TChunkIHDR(Source).ImageData,
+ BytesPerRow * Integer(Height));
+ CopyMemory(ImageAlpha, TChunkIHDR(Source).ImageAlpha,
+ Integer(Width) * Integer(Height));
+
+ {Copy palette colors}
+ BitmapInfo.bmiColors := TChunkIHDR(Source).BitmapInfo.bmiColors;
+ end
+ else
+ Owner.RaiseError(EPNGError, EPNGCannotAssignChunkText);
+end;
+
+{Release allocated image data}
+procedure TChunkIHDR.FreeImageData;
+begin
+ {Free old image data}
+ if ImageHandle <> 0 then DeleteObject(ImageHandle);
+ if ImageDC <> 0 then DeleteDC(ImageDC);
+ if ImageAlpha <> nil then FreeMem(ImageAlpha);
+ {$IFDEF Store16bits}
+ if ExtraImageData <> nil then FreeMem(ExtraImageData);
+ {$ENDIF}
+ ImageHandle := 0; ImageDC := 0; ImageAlpha := nil; ImageData := nil;
+end;
+
+{Chunk being loaded from a stream}
+function TChunkIHDR.LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean;
+begin
+ {Let TChunk load it}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+ if not Result then Exit;
+
+ {Now check values}
+ {Note: It's recommended by png specification to make sure that the size}
+ {must be 13 bytes to be valid, but some images with 14 bytes were found}
+ {which could be loaded by internet explorer and other tools}
+ if (fDataSize < SIZEOF(TIHdrData)) then
+ begin
+ {Ihdr must always have at least 13 bytes}
+ Result := False;
+ Owner.RaiseError(EPNGInvalidIHDR, EPNGInvalidIHDRText);
+ exit;
+ end;
+
+ {Everything ok, reads IHDR}
+ IHDRData := pIHDRData(fData)^;
+ IHDRData.Width := ByteSwap(IHDRData.Width);
+ IHDRData.Height := ByteSwap(IHDRData.Height);
+
+ {The width and height must not be larger than 65535 pixels}
+ if (IHDRData.Width > High(Word)) or (IHDRData.Height > High(Word)) then
+ begin
+ Result := False;
+ Owner.RaiseError(EPNGSizeExceeds, EPNGSizeExceedsText);
+ exit;
+ end {if IHDRData.Width > High(Word)};
+ {Compression method must be 0 (inflate/deflate)}
+ if (IHDRData.CompressionMethod <> 0) then
+ begin
+ Result := False;
+ Owner.RaiseError(EPNGUnknownCompression, EPNGUnknownCompressionText);
+ exit;
+ end;
+ {Interlace must be either 0 (none) or 7 (adam7)}
+ if (IHDRData.InterlaceMethod <> 0) and (IHDRData.InterlaceMethod <> 1) then
+ begin
+ Result := False;
+ Owner.RaiseError(EPNGUnknownInterlace, EPNGUnknownInterlaceText);
+ exit;
+ end;
+
+ {Updates owner properties}
+ Owner.InterlaceMethod := TInterlaceMethod(IHDRData.InterlaceMethod);
+
+ {Prepares data to hold image}
+ PrepareImageData();
+end;
+
+{Saving the IHDR chunk to a stream}
+function TChunkIHDR.SaveToStream(Stream: TStream): Boolean;
+begin
+ {Ignore 2 bits images}
+ if BitDepth = 2 then BitDepth := 4;
+
+ {It needs to do is update the data with the IHDR data}
+ {structure containing the write values}
+ ResizeData(SizeOf(TIHDRData));
+ pIHDRData(fData)^ := IHDRData;
+ {..byteswap 4 byte types}
+ pIHDRData(fData)^.Width := ByteSwap(pIHDRData(fData)^.Width);
+ pIHDRData(fData)^.Height := ByteSwap(pIHDRData(fData)^.Height);
+ {..update interlace method}
+ pIHDRData(fData)^.InterlaceMethod := Byte(Owner.InterlaceMethod);
+ {..and then let the ancestor SaveToStream do the hard work}
+ Result := inherited SaveToStream(Stream);
+end;
+
+{Resizes the image data to fill the color type, bit depth, }
+{width and height parameters}
+procedure TChunkIHDR.PrepareImageData();
+
+ {Set the bitmap info}
+ procedure SetInfo(const Bitdepth: Integer; const Palette: Boolean);
+ begin
+
+ {Copy if the bitmap contain palette entries}
+ HasPalette := Palette;
+ {Initialize the structure with zeros}
+ fillchar(BitmapInfo, sizeof(BitmapInfo), #0);
+ {Fill the strucutre}
+ with BitmapInfo.bmiHeader do
+ begin
+ biSize := sizeof(TBitmapInfoHeader);
+ biHeight := Height;
+ biWidth := Width;
+ biPlanes := 1;
+ biBitCount := BitDepth;
+ biCompression := BI_RGB;
+ end {with BitmapInfo.bmiHeader}
+ end;
+begin
+ {Prepare bitmap info header}
+ Fillchar(BitmapInfo, sizeof(TMaxBitmapInfo), #0);
+ {Release old image data}
+ FreeImageData();
+
+ {Obtain number of bits for each pixel}
+ case ColorType of
+ COLOR_GRAYSCALE, COLOR_PALETTE, COLOR_GRAYSCALEALPHA:
+ case BitDepth of
+ {These are supported by windows}
+ 1, 4, 8: SetInfo(BitDepth, TRUE);
+ {2 bits for each pixel is not supported by windows bitmap}
+ 2 : SetInfo(4, TRUE);
+ {Also 16 bits (2 bytes) for each pixel is not supported}
+ {and should be transormed into a 8 bit grayscale}
+ 16 : SetInfo(8, TRUE);
+ end;
+ {Only 1 byte (8 bits) is supported}
+ COLOR_RGB, COLOR_RGBALPHA: SetInfo(24, FALSE);
+ end {case ColorType};
+ {Number of bytes for each scanline}
+ BytesPerRow := (((BitmapInfo.bmiHeader.biBitCount * Width) + 31)
+ and not 31) div 8;
+
+ {Build array for alpha information, if necessary}
+ if (ColorType = COLOR_RGBALPHA) or (ColorType = COLOR_GRAYSCALEALPHA) then
+ begin
+ GetMem(ImageAlpha, Integer(Width) * Integer(Height));
+ FillChar(ImageAlpha^, Integer(Width) * Integer(Height), #0);
+ end;
+
+ {Build array for extra byte information}
+ {$IFDEF Store16bits}
+ if (BitDepth = 16) then
+ begin
+ GetMem(ExtraImageData, BytesPerRow * Integer(Height));
+ FillChar(ExtraImageData^, BytesPerRow * Integer(Height), #0);
+ end;
+ {$ENDIF}
+
+ {Creates the image to hold the data, CreateDIBSection does a better}
+ {work in allocating necessary memory}
+ ImageDC := CreateCompatibleDC(0);
+ ImageHandle := CreateDIBSection(ImageDC, pBitmapInfo(@BitmapInfo)^,
+ DIB_RGB_COLORS, ImageData, 0, 0);
+
+ {Clears the old palette (if any)}
+ with Owner do
+ if TempPalette <> 0 then
+ begin
+ DeleteObject(TempPalette);
+ TempPalette := 0;
+ end {with Owner, if TempPalette <> 0};
+
+ {Build array and allocate bytes for each row}
+ zeromemory(ImageData, BytesPerRow * Integer(Height));
+end;
+
+{TChunktRNS implementation}
+
+{$IFNDEF UseDelphi}
+function CompareMem(P1, P2: pByte; const Size: Integer): Boolean;
+var i: Integer;
+begin
+ Result := True;
+ for i := 1 to Size do
+ begin
+ if P1^ <> P2^ then Result := False;
+ inc(P1); inc(P2);
+ end {for i}
+end;
+{$ENDIF}
+
+{Sets the transpararent color}
+procedure TChunktRNS.SetTransparentColor(const Value: ColorRef);
+var
+ i: Byte;
+ LookColor: TRGBQuad;
+begin
+ {Clears the palette values}
+ Fillchar(PaletteValues, SizeOf(PaletteValues), #0);
+ {Sets that it uses bit transparency}
+ fBitTransparency := True;
+
+
+ {Depends on the color type}
+ with Header do
+ case ColorType of
+ COLOR_GRAYSCALE:
+ begin
+ Self.ResizeData(2);
+ pWord(@PaletteValues[0])^ := ByteSwap16(GetRValue(Value));
+ end;
+ COLOR_RGB:
+ begin
+ Self.ResizeData(6);
+ pWord(@PaletteValues[0])^ := ByteSwap16(GetRValue(Value));
+ pWord(@PaletteValues[2])^ := ByteSwap16(GetGValue(Value));
+ pWord(@PaletteValues[4])^ := ByteSwap16(GetBValue(Value));
+ end;
+ COLOR_PALETTE:
+ begin
+ {Creates a RGBQuad to search for the color}
+ LookColor.rgbRed := GetRValue(Value);
+ LookColor.rgbGreen := GetGValue(Value);
+ LookColor.rgbBlue := GetBValue(Value);
+ {Look in the table for the entry}
+ for i := 0 to 255 do
+ if CompareMem(@BitmapInfo.bmiColors[i], @LookColor, 3) then
+ Break;
+ {Fill the transparency table}
+ Fillchar(PaletteValues, i, 255);
+ Self.ResizeData(i + 1)
+
+ end
+ end {case / with};
+
+end;
+
+{Returns the transparent color for the image}
+function TChunktRNS.GetTransparentColor: ColorRef;
+var
+ PaletteChunk: TChunkPLTE;
+ i: Integer;
+begin
+ Result := 0; {Default: Unknown transparent color}
+
+ {Depends on the color type}
+ with Header do
+ case ColorType of
+ COLOR_GRAYSCALE:
+ Result := RGB(PaletteValues[0], PaletteValues[0],
+ PaletteValues[0]);
+ COLOR_RGB:
+ Result := RGB(PaletteValues[1], PaletteValues[3], PaletteValues[5]);
+ COLOR_PALETTE:
+ begin
+ {Obtains the palette chunk}
+ PaletteChunk := Owner.Chunks.ItemFromClass(TChunkPLTE) as TChunkPLTE;
+
+ {Looks for an entry with 0 transparency meaning that it is the}
+ {full transparent entry}
+ for i := 0 to Self.DataSize - 1 do
+ if PaletteValues[i] = 0 then
+ with PaletteChunk.GetPaletteItem(i) do
+ begin
+ Result := RGB(rgbRed, rgbGreen, rgbBlue);
+ break
+ end
+ end {COLOR_PALETTE}
+ end {case Header.ColorType};
+end;
+
+{Saving the chunk to a stream}
+function TChunktRNS.SaveToStream(Stream: TStream): Boolean;
+begin
+ {Copy palette into data buffer}
+ if DataSize <= 256 then
+ CopyMemory(fData, @PaletteValues[0], DataSize);
+
+ Result := inherited SaveToStream(Stream);
+end;
+
+{Assigns from another chunk}
+procedure TChunktRNS.Assign(Source: TChunk);
+begin
+ CopyMemory(@PaletteValues[0], @TChunkTrns(Source).PaletteValues[0], 256);
+ fBitTransparency := TChunkTrns(Source).fBitTransparency;
+ inherited Assign(Source);
+end;
+
+{Loads the chunk from a stream}
+function TChunktRNS.LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean;
+var
+ i, Differ255: Integer;
+begin
+ {Let inherited load}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+
+ if not Result then Exit;
+
+ {Make sure size is correct}
+ if Size > 256 then Owner.RaiseError(EPNGInvalidPalette,
+ EPNGInvalidPaletteText);
+
+ {The unset items should have value 255}
+ Fillchar(PaletteValues[0], 256, 255);
+ {Copy the other values}
+ CopyMemory(@PaletteValues[0], fData, Size);
+
+ {Create the mask if needed}
+ case Header.ColorType of
+ {Mask for grayscale and RGB}
+ COLOR_RGB, COLOR_GRAYSCALE: fBitTransparency := True;
+ COLOR_PALETTE:
+ begin
+ Differ255 := 0; {Count the entries with a value different from 255}
+ {Tests if it uses bit transparency}
+ for i := 0 to Size - 1 do
+ if PaletteValues[i] <> 255 then inc(Differ255);
+
+ {If it has one value different from 255 it is a bit transparency}
+ fBitTransparency := (Differ255 = 1);
+ end {COLOR_PALETTE}
+ end {case Header.ColorType};
+
+end;
+
+{Prepares the image palette}
+procedure TChunkIDAT.PreparePalette;
+var
+ Entries: Word;
+ j : Integer;
+begin
+ {In case the image uses grayscale, build a grayscale palette}
+ with Header do
+ if (ColorType = COLOR_GRAYSCALE) or (ColorType = COLOR_GRAYSCALEALPHA) then
+ begin
+ {Calculate total number of palette entries}
+ Entries := (1 shl Byte(BitmapInfo.bmiHeader.biBitCount));
+
+ FOR j := 0 TO Entries - 1 DO
+ with BitmapInfo.bmiColors[j] do
+ begin
+
+ {Calculate each palette entry}
+ rgbRed := fOwner.GammaTable[MulDiv(j, 255, Entries - 1)];
+ rgbGreen := rgbRed;
+ rgbBlue := rgbRed;
+ end {with BitmapInfo.bmiColors[j]}
+ end {if ColorType = COLOR_GRAYSCALE..., with Header}
+end;
+
+{Reads from ZLIB}
+function TChunkIDAT.IDATZlibRead(var ZLIBStream: TZStreamRec2;
+ Buffer: Pointer; Count: Integer; var EndPos: Integer;
+ var crcfile: Cardinal): Integer;
+var
+ ProcResult : Integer;
+ IDATHeader : Array[0..3] of char;
+ IDATCRC : Cardinal;
+begin
+ {Uses internal record pointed by ZLIBStream to gather information}
+ with ZLIBStream, ZLIBStream.zlib do
+ begin
+ {Set the buffer the zlib will read into}
+ next_out := Buffer;
+ avail_out := Count;
+
+ {Decode until it reach the Count variable}
+ while avail_out > 0 do
+ begin
+ {In case it needs more data and it's in the end of a IDAT chunk,}
+ {it means that there are more IDAT chunks}
+ if (fStream.Position = EndPos) and (avail_out > 0) and
+ (avail_in = 0) then
+ begin
+ {End this chunk by reading and testing the crc value}
+ fStream.Read(IDATCRC, 4);
+
+ {$IFDEF CheckCRC}
+ if crcfile xor $ffffffff <> Cardinal(ByteSwap(IDATCRC)) then
+ begin
+ Result := -1;
+ Owner.RaiseError(EPNGInvalidCRC, EPNGInvalidCRCText);
+ exit;
+ end;
+ {$ENDIF}
+
+ {Start reading the next chunk}
+ fStream.Read(EndPos, 4); {Reads next chunk size}
+ fStream.Read(IDATHeader[0], 4); {Next chunk header}
+ {It must be a IDAT chunk since image data is required and PNG}
+ {specification says that multiple IDAT chunks must be consecutive}
+ if IDATHeader <> 'IDAT' then
+ begin
+ Owner.RaiseError(EPNGMissingMultipleIDAT, EPNGMissingMultipleIDATText);
+ result := -1;
+ exit;
+ end;
+
+ {Calculate chunk name part of the crc}
+ {$IFDEF CheckCRC}
+ crcfile := update_crc($ffffffff, @IDATHeader[0], 4);
+ {$ENDIF}
+ EndPos := fStream.Position + ByteSwap(EndPos);
+ end;
+
+
+ {In case it needs compressed data to read from}
+ if avail_in = 0 then
+ begin
+ {In case it's trying to read more than it is avaliable}
+ if fStream.Position + ZLIBAllocate > EndPos then
+ avail_in := fStream.Read(Data^, EndPos - fStream.Position)
+ else
+ avail_in := fStream.Read(Data^, ZLIBAllocate);
+ {Update crc}
+ {$IFDEF CheckCRC}
+ crcfile := update_crc(crcfile, Data, avail_in);
+ {$ENDIF}
+
+ {In case there is no more compressed data to read from}
+ if avail_in = 0 then
+ begin
+ Result := Count - avail_out;
+ Exit;
+ end;
+
+ {Set next buffer to read and record current position}
+ next_in := Data;
+
+ end {if avail_in = 0};
+
+ ProcResult := inflate(zlib, 0);
+
+ {In case the result was not sucessfull}
+ if (ProcResult < 0) then
+ begin
+ Result := -1;
+ Owner.RaiseError(EPNGZLIBError,
+ EPNGZLIBErrorText + zliberrors[procresult]);
+ exit;
+ end;
+
+ end {while avail_out > 0};
+
+ end {with};
+
+ {If everything gone ok, it returns the count bytes}
+ Result := Count;
+end;
+
+{TChunkIDAT implementation}
+
+const
+ {Adam 7 interlacing values}
+ RowStart: array[0..6] of Integer = (0, 0, 4, 0, 2, 0, 1);
+ ColumnStart: array[0..6] of Integer = (0, 4, 0, 2, 0, 1, 0);
+ RowIncrement: array[0..6] of Integer = (8, 8, 8, 4, 4, 2, 2);
+ ColumnIncrement: array[0..6] of Integer = (8, 8, 4, 4, 2, 2, 1);
+
+{Copy interlaced images with 1 byte for R, G, B}
+procedure TChunkIDAT.CopyInterlacedRGB8(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col * 3);
+ repeat
+ {Copy this row}
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+
+ {Move to next column}
+ inc(Src, 3);
+ inc(Dest, ColumnIncrement[Pass] * 3 - 3);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy interlaced images with 2 bytes for R, G, B}
+procedure TChunkIDAT.CopyInterlacedRGB16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col * 3);
+ repeat
+ {Copy this row}
+ Byte(Dest^) := Owner.GammaTable[pByte(Longint(Src) + 4)^]; inc(Dest);
+ Byte(Dest^) := Owner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := Owner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+ {$IFDEF Store16bits}
+ {Copy extra pixel values}
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 5)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 3)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Extra);
+ {$ENDIF}
+
+ {Move to next column}
+ inc(Src, 6);
+ inc(Dest, ColumnIncrement[Pass] * 3 - 3);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy ímages with palette using bit depths 1, 4 or 8}
+procedure TChunkIDAT.CopyInterlacedPalette148(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+const
+ BitTable: Array[1..8] of Integer = ($1, $3, 0, $F, 0, 0, 0, $FF);
+ StartBit: Array[1..8] of Integer = (7 , 0 , 0, 4, 0, 0, 0, 0);
+var
+ CurBit, Col: Integer;
+ Dest2: PChar;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ repeat
+ {Copy data}
+ CurBit := StartBit[Header.BitDepth];
+ repeat
+ {Adjust pointer to pixel byte bounds}
+ Dest2 := pChar(Longint(Dest) + (Header.BitDepth * Col) div 8);
+ {Copy data}
+ Byte(Dest2^) := Byte(Dest2^) or
+ ( ((Byte(Src^) shr CurBit) and BitTable[Header.BitDepth])
+ shl (StartBit[Header.BitDepth] - (Col * Header.BitDepth mod 8)));
+
+ {Move to next column}
+ inc(Col, ColumnIncrement[Pass]);
+ {Will read next bits}
+ dec(CurBit, Header.BitDepth);
+ until CurBit < 0;
+
+ {Move to next byte in source}
+ inc(Src);
+ until Col >= ImageWidth;
+end;
+
+{Copy ímages with palette using bit depth 2}
+procedure TChunkIDAT.CopyInterlacedPalette2(const Pass: Byte; Src, Dest,
+ Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ CurBit, Col: Integer;
+ Dest2: PChar;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ repeat
+ {Copy data}
+ CurBit := 6;
+ repeat
+ {Adjust pointer to pixel byte bounds}
+ Dest2 := pChar(Longint(Dest) + Col div 2);
+ {Copy data}
+ Byte(Dest2^) := Byte(Dest2^) or (((Byte(Src^) shr CurBit) and $3)
+ shl (4 - (4 * Col) mod 8));
+ {Move to next column}
+ inc(Col, ColumnIncrement[Pass]);
+ {Will read next bits}
+ dec(CurBit, 2);
+ until CurBit < 0;
+
+ {Move to next byte in source}
+ inc(Src);
+ until Col >= ImageWidth;
+end;
+
+{Copy ímages with grayscale using bit depth 2}
+procedure TChunkIDAT.CopyInterlacedGray2(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ CurBit, Col: Integer;
+ Dest2: PChar;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ repeat
+ {Copy data}
+ CurBit := 6;
+ repeat
+ {Adjust pointer to pixel byte bounds}
+ Dest2 := pChar(Longint(Dest) + Col div 2);
+ {Copy data}
+ Byte(Dest2^) := Byte(Dest2^) or ((((Byte(Src^) shr CurBit) shl 2) and $F)
+ shl (4 - (Col*4) mod 8));
+ {Move to next column}
+ inc(Col, ColumnIncrement[Pass]);
+ {Will read next bits}
+ dec(CurBit, 2);
+ until CurBit < 0;
+
+ {Move to next byte in source}
+ inc(Src);
+ until Col >= ImageWidth;
+end;
+
+{Copy ímages with palette using 2 bytes for each pixel}
+procedure TChunkIDAT.CopyInterlacedGrayscale16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col);
+ repeat
+ {Copy this row}
+ Dest^ := Src^; inc(Dest);
+ {$IFDEF Store16bits}
+ Extra^ := pChar(Longint(Src) + 1)^; inc(Extra);
+ {$ENDIF}
+
+ {Move to next column}
+ inc(Src, 2);
+ inc(Dest, ColumnIncrement[Pass] - 1);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Decodes interlaced RGB alpha with 1 byte for each sample}
+procedure TChunkIDAT.CopyInterlacedRGBAlpha8(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col * 3);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this row and alpha value}
+ Trans^ := pChar(Longint(Src) + 3)^;
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+
+ {Move to next column}
+ inc(Src, 4);
+ inc(Dest, ColumnIncrement[Pass] * 3 - 3);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Decodes interlaced RGB alpha with 2 bytes for each sample}
+procedure TChunkIDAT.CopyInterlacedRGBAlpha16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col * 3);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this row and alpha value}
+ Trans^ := pChar(Longint(Src) + 6)^;
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 4)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+ {$IFDEF Store16bits}
+ {Copy extra pixel values}
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 5)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 3)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Extra);
+ {$ENDIF}
+
+ {Move to next column}
+ inc(Src, 8);
+ inc(Dest, ColumnIncrement[Pass] * 3 - 3);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Decodes 8 bit grayscale image followed by an alpha sample}
+procedure TChunkIDAT.CopyInterlacedGrayscaleAlpha8(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column, pointers to the data and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this grayscale value and alpha}
+ Dest^ := Src^; inc(Src);
+ Trans^ := Src^; inc(Src);
+
+ {Move to next column}
+ inc(Dest, ColumnIncrement[Pass]);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Decodes 16 bit grayscale image followed by an alpha sample}
+procedure TChunkIDAT.CopyInterlacedGrayscaleAlpha16(const Pass: Byte;
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column, pointers to the data and enter in loop}
+ Col := ColumnStart[Pass];
+ Dest := pChar(Longint(Dest) + Col);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {$IFDEF Store16bits}
+ Extra^ := pChar(Longint(Src) + 1)^; inc(Extra);
+ {$ENDIF}
+ {Copy this grayscale value and alpha, transforming 16 bits into 8}
+ Dest^ := Src^; inc(Src, 2);
+ Trans^ := Src^; inc(Src, 2);
+
+ {Move to next column}
+ inc(Dest, ColumnIncrement[Pass]);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Decodes an interlaced image}
+procedure TChunkIDAT.DecodeInterlacedAdam7(Stream: TStream;
+ var ZLIBStream: TZStreamRec2; const Size: Integer; var crcfile: Cardinal);
+var
+ CurrentPass: Byte;
+ PixelsThisRow: Integer;
+ CurrentRow: Integer;
+ Trans, Data{$IFDEF Store16bits}, Extra{$ENDIF}: pChar;
+ CopyProc: procedure(const Pass: Byte; Src, Dest,
+ Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar) of object;
+begin
+
+ CopyProc := nil; {Initialize}
+ {Determine method to copy the image data}
+ case Header.ColorType of
+ {R, G, B values for each pixel}
+ COLOR_RGB:
+ case Header.BitDepth of
+ 8: CopyProc := CopyInterlacedRGB8;
+ 16: CopyProc := CopyInterlacedRGB16;
+ end {case Header.BitDepth};
+ {Palette}
+ COLOR_PALETTE, COLOR_GRAYSCALE:
+ case Header.BitDepth of
+ 1, 4, 8: CopyProc := CopyInterlacedPalette148;
+ 2 : if Header.ColorType = COLOR_PALETTE then
+ CopyProc := CopyInterlacedPalette2
+ else
+ CopyProc := CopyInterlacedGray2;
+ 16 : CopyProc := CopyInterlacedGrayscale16;
+ end;
+ {RGB followed by alpha}
+ COLOR_RGBALPHA:
+ case Header.BitDepth of
+ 8: CopyProc := CopyInterlacedRGBAlpha8;
+ 16: CopyProc := CopyInterlacedRGBAlpha16;
+ end;
+ {Grayscale followed by alpha}
+ COLOR_GRAYSCALEALPHA:
+ case Header.BitDepth of
+ 8: CopyProc := CopyInterlacedGrayscaleAlpha8;
+ 16: CopyProc := CopyInterlacedGrayscaleAlpha16;
+ end;
+ end {case Header.ColorType};
+
+ {Adam7 method has 7 passes to make the final image}
+ FOR CurrentPass := 0 TO 6 DO
+ begin
+ {Calculates the number of pixels and bytes for this pass row}
+ PixelsThisRow := (ImageWidth - ColumnStart[CurrentPass] +
+ ColumnIncrement[CurrentPass] - 1) div ColumnIncrement[CurrentPass];
+ Row_Bytes := BytesForPixels(PixelsThisRow, Header.ColorType,
+ Header.BitDepth);
+ {Clear buffer for this pass}
+ ZeroMemory(Row_Buffer[not RowUsed], Row_Bytes);
+
+ {Get current row index}
+ CurrentRow := RowStart[CurrentPass];
+ {Get a pointer to the current row image data}
+ Data := Ptr(Longint(Header.ImageData) + Header.BytesPerRow *
+ (ImageHeight - 1 - CurrentRow));
+ Trans := Ptr(Longint(Header.ImageAlpha) + ImageWidth * CurrentRow);
+ {$IFDEF Store16bits}
+ Extra := Ptr(Longint(Header.ExtraImageData) + Header.BytesPerRow *
+ (ImageHeight - 1 - CurrentRow));
+ {$ENDIF}
+
+ if Row_Bytes > 0 then {There must have bytes for this interlaced pass}
+ while CurrentRow < ImageHeight do
+ begin
+ {Reads this line and filter}
+ if IDATZlibRead(ZLIBStream, @Row_Buffer[RowUsed][0], Row_Bytes + 1,
+ EndPos, CRCFile) = 0 then break;
+
+ FilterRow;
+ {Copy image data}
+
+ CopyProc(CurrentPass, @Row_Buffer[RowUsed][1], Data, Trans
+ {$IFDEF Store16bits}, Extra{$ENDIF});
+
+ {Use the other RowBuffer item}
+ RowUsed := not RowUsed;
+
+ {Move to the next row}
+ inc(CurrentRow, RowIncrement[CurrentPass]);
+ {Move pointer to the next line}
+ dec(Data, RowIncrement[CurrentPass] * Header.BytesPerRow);
+ inc(Trans, RowIncrement[CurrentPass] * ImageWidth);
+ {$IFDEF Store16bits}
+ dec(Extra, RowIncrement[CurrentPass] * Header.BytesPerRow);
+ {$ENDIF}
+ end {while CurrentRow < ImageHeight};
+
+ end {FOR CurrentPass};
+
+end;
+
+{Copy 8 bits RGB image}
+procedure TChunkIDAT.CopyNonInterlacedRGB8(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ {Copy pixel values}
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+ {Move to next pixel}
+ inc(Src, 3);
+ end {for I}
+end;
+
+{Copy 16 bits RGB image}
+procedure TChunkIDAT.CopyNonInterlacedRGB16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ //Since windows does not supports 2 bytes for
+ //each R, G, B value, the method will read only 1 byte from it
+ {Copy pixel values}
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 4)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+ {$IFDEF Store16bits}
+ {Copy extra pixel values}
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 5)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 3)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Extra);
+ {$ENDIF}
+
+ {Move to next pixel}
+ inc(Src, 6);
+ end {for I}
+end;
+
+{Copy types using palettes (1, 4 or 8 bits per pixel)}
+procedure TChunkIDAT.CopyNonInterlacedPalette148(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+begin
+ {It's simple as copying the data}
+ CopyMemory(Dest, Src, Row_Bytes);
+end;
+
+{Copy grayscale types using 2 bits for each pixel}
+procedure TChunkIDAT.CopyNonInterlacedGray2(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ i: Integer;
+begin
+ {2 bits is not supported, this routine will converted into 4 bits}
+ FOR i := 1 TO Row_Bytes do
+ begin
+ Byte(Dest^) := ((Byte(Src^) shr 2) and $F) or ((Byte(Src^)) and $F0); inc(Dest);
+ Byte(Dest^) := ((Byte(Src^) shl 2) and $F) or ((Byte(Src^) shl 4) and $F0); inc(Dest);
+ inc(Src);
+ end {FOR i}
+end;
+
+{Copy types using palette with 2 bits for each pixel}
+procedure TChunkIDAT.CopyNonInterlacedPalette2(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ i: Integer;
+begin
+ {2 bits is not supported, this routine will converted into 4 bits}
+ FOR i := 1 TO Row_Bytes do
+ begin
+ Byte(Dest^) := ((Byte(Src^) shr 4) and $3) or ((Byte(Src^) shr 2) and $30); inc(Dest);
+ Byte(Dest^) := (Byte(Src^) and $3) or ((Byte(Src^) shl 2) and $30); inc(Dest);
+ inc(Src);
+ end {FOR i}
+end;
+
+{Copy grayscale images with 16 bits}
+procedure TChunkIDAT.CopyNonInterlacedGrayscale16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ {Windows does not supports 16 bits for each pixel in grayscale}
+ {mode, so reduce to 8}
+ Dest^ := Src^; inc(Dest);
+ {$IFDEF Store16bits}
+ Extra^ := pChar(Longint(Src) + 1)^; inc(Extra);
+ {$ENDIF}
+
+ {Move to next pixel}
+ inc(Src, 2);
+ end {for I}
+end;
+
+{Copy 8 bits per sample RGB images followed by an alpha byte}
+procedure TChunkIDAT.CopyNonInterlacedRGBAlpha8(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ i: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ {Copy pixel values and transparency}
+ Trans^ := pChar(Longint(Src) + 3)^;
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+ {Move to next pixel}
+ inc(Src, 4); inc(Trans);
+ end {for I}
+end;
+
+{Copy 16 bits RGB image with alpha using 2 bytes for each sample}
+procedure TChunkIDAT.CopyNonInterlacedRGBAlpha16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ //Copy rgb and alpha values (transforming from 16 bits to 8 bits)
+ {Copy pixel values}
+ Trans^ := pChar(Longint(Src) + 6)^;
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 4)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest);
+ {$IFDEF Store16bits}
+ {Copy extra pixel values}
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 5)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 3)^]; inc(Extra);
+ Byte(Extra^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Extra);
+ {$ENDIF}
+ {Move to next pixel}
+ inc(Src, 8); inc(Trans);
+ end {for I}
+end;
+
+{Copy 8 bits per sample grayscale followed by alpha}
+procedure TChunkIDAT.CopyNonInterlacedGrayscaleAlpha8(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ {Copy alpha value and then gray value}
+ Dest^ := Src^; inc(Src);
+ Trans^ := Src^; inc(Src);
+ inc(Dest); inc(Trans);
+ end;
+end;
+
+{Copy 16 bits per sample grayscale followed by alpha}
+procedure TChunkIDAT.CopyNonInterlacedGrayscaleAlpha16(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ {Copy alpha value and then gray value}
+ {$IFDEF Store16bits}
+ Extra^ := pChar(Longint(Src) + 1)^; inc(Extra);
+ {$ENDIF}
+ Dest^ := Src^; inc(Src, 2);
+ Trans^ := Src^; inc(Src, 2);
+ inc(Dest); inc(Trans);
+ end;
+end;
+
+{Decode non interlaced image}
+procedure TChunkIDAT.DecodeNonInterlaced(Stream: TStream;
+ var ZLIBStream: TZStreamRec2; const Size: Integer; var crcfile: Cardinal);
+var
+ j: Cardinal;
+ Trans, Data{$IFDEF Store16bits}, Extra{$ENDIF}: pChar;
+ CopyProc: procedure(
+ Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar) of object;
+begin
+ CopyProc := nil; {Initialize}
+ {Determines the method to copy the image data}
+ case Header.ColorType of
+ {R, G, B values}
+ COLOR_RGB:
+ case Header.BitDepth of
+ 8: CopyProc := CopyNonInterlacedRGB8;
+ 16: CopyProc := CopyNonInterlacedRGB16;
+ end;
+ {Types using palettes}
+ COLOR_PALETTE, COLOR_GRAYSCALE:
+ case Header.BitDepth of
+ 1, 4, 8: CopyProc := CopyNonInterlacedPalette148;
+ 2 : if Header.ColorType = COLOR_PALETTE then
+ CopyProc := CopyNonInterlacedPalette2
+ else
+ CopyProc := CopyNonInterlacedGray2;
+ 16 : CopyProc := CopyNonInterlacedGrayscale16;
+ end;
+ {R, G, B followed by alpha}
+ COLOR_RGBALPHA:
+ case Header.BitDepth of
+ 8 : CopyProc := CopyNonInterlacedRGBAlpha8;
+ 16 : CopyProc := CopyNonInterlacedRGBAlpha16;
+ end;
+ {Grayscale followed by alpha}
+ COLOR_GRAYSCALEALPHA:
+ case Header.BitDepth of
+ 8 : CopyProc := CopyNonInterlacedGrayscaleAlpha8;
+ 16 : CopyProc := CopyNonInterlacedGrayscaleAlpha16;
+ end;
+ end;
+
+ {Get the image data pointer}
+ Longint(Data) := Longint(Header.ImageData) +
+ Header.BytesPerRow * (ImageHeight - 1);
+ Trans := Header.ImageAlpha;
+ {$IFDEF Store16bits}
+ Longint(Extra) := Longint(Header.ExtraImageData) +
+ Header.BytesPerRow * (ImageHeight - 1);
+ {$ENDIF}
+ {Reads each line}
+ FOR j := 0 to ImageHeight - 1 do
+ begin
+ {Read this line Row_Buffer[RowUsed][0] if the filter type for this line}
+ if IDATZlibRead(ZLIBStream, @Row_Buffer[RowUsed][0], Row_Bytes + 1, EndPos,
+ CRCFile) = 0 then break;
+
+ {Filter the current row}
+ FilterRow;
+ {Copies non interlaced row to image}
+ CopyProc(@Row_Buffer[RowUsed][1], Data, Trans{$IFDEF Store16bits}, Extra
+ {$ENDIF});
+
+ {Invert line used}
+ RowUsed := not RowUsed;
+ dec(Data, Header.BytesPerRow);
+ {$IFDEF Store16bits}dec(Extra, Header.BytesPerRow);{$ENDIF}
+ inc(Trans, ImageWidth);
+ end {for I};
+
+
+end;
+
+{Filter the current line}
+procedure TChunkIDAT.FilterRow;
+var
+ pp: Byte;
+ vv, left, above, aboveleft: Integer;
+ Col: Cardinal;
+begin
+ {Test the filter}
+ case Row_Buffer[RowUsed]^[0] of
+ {No filtering for this line}
+ FILTER_NONE: begin end;
+ {AND 255 serves only to never let the result be larger than one byte}
+ {Sub filter}
+ FILTER_SUB:
+ FOR Col := Offset + 1 to Row_Bytes DO
+ Row_Buffer[RowUsed][Col] := (Row_Buffer[RowUsed][Col] +
+ Row_Buffer[RowUsed][Col - Offset]) and 255;
+ {Up filter}
+ FILTER_UP:
+ FOR Col := 1 to Row_Bytes DO
+ Row_Buffer[RowUsed][Col] := (Row_Buffer[RowUsed][Col] +
+ Row_Buffer[not RowUsed][Col]) and 255;
+ {Average filter}
+ FILTER_AVERAGE:
+ FOR Col := 1 to Row_Bytes DO
+ begin
+ {Obtains up and left pixels}
+ above := Row_Buffer[not RowUsed][Col];
+ if col - 1 < Offset then
+ left := 0
+ else
+ Left := Row_Buffer[RowUsed][Col - Offset];
+
+ {Calculates}
+ Row_Buffer[RowUsed][Col] := (Row_Buffer[RowUsed][Col] +
+ (left + above) div 2) and 255;
+ end;
+ {Paeth filter}
+ FILTER_PAETH:
+ begin
+ {Initialize}
+ left := 0;
+ aboveleft := 0;
+ {Test each byte}
+ FOR Col := 1 to Row_Bytes DO
+ begin
+ {Obtains above pixel}
+ above := Row_Buffer[not RowUsed][Col];
+ {Obtains left and top-left pixels}
+ if (col - 1 >= offset) Then
+ begin
+ left := row_buffer[RowUsed][col - offset];
+ aboveleft := row_buffer[not RowUsed][col - offset];
+ end;
+
+ {Obtains current pixel and paeth predictor}
+ vv := row_buffer[RowUsed][Col];
+ pp := PaethPredictor(left, above, aboveleft);
+
+ {Calculates}
+ Row_Buffer[RowUsed][Col] := (pp + vv) and $FF;
+ end {for};
+ end;
+
+ end {case};
+end;
+
+{Reads the image data from the stream}
+function TChunkIDAT.LoadFromStream(Stream: TStream; const ChunkName: TChunkName;
+ Size: Integer): Boolean;
+var
+ ZLIBStream: TZStreamRec2;
+ CRCCheck,
+ CRCFile : Cardinal;
+begin
+ {Get pointer to the header chunk}
+ Header := Owner.Chunks.Item[0] as TChunkIHDR;
+ {Build palette if necessary}
+ if Header.HasPalette then PreparePalette();
+
+ {Copy image width and height}
+ ImageWidth := Header.Width;
+ ImageHeight := Header.Height;
+
+ {Initialize to calculate CRC}
+ {$IFDEF CheckCRC}
+ CRCFile := update_crc($ffffffff, @ChunkName[0], 4);
+ {$ENDIF}
+
+ Owner.GetPixelInfo(Row_Bytes, Offset); {Obtain line information}
+ ZLIBStream := ZLIBInitInflate(Stream); {Initializes decompression}
+
+ {Calculate ending position for the current IDAT chunk}
+ EndPos := Stream.Position + Size;
+
+ {Allocate memory}
+ GetMem(Row_Buffer[false], Row_Bytes + 1);
+ GetMem(Row_Buffer[true], Row_Bytes + 1);
+ ZeroMemory(Row_Buffer[false], Row_bytes + 1);
+ {Set the variable to alternate the Row_Buffer item to use}
+ RowUsed := TRUE;
+
+ {Call special methods for the different interlace methods}
+ case Owner.InterlaceMethod of
+ imNone: DecodeNonInterlaced(stream, ZLIBStream, Size, crcfile);
+ imAdam7: DecodeInterlacedAdam7(stream, ZLIBStream, size, crcfile);
+ end;
+
+ {Free memory}
+ ZLIBTerminateInflate(ZLIBStream); {Terminates decompression}
+ FreeMem(Row_Buffer[False], Row_Bytes + 1);
+ FreeMem(Row_Buffer[True], Row_Bytes + 1);
+
+ {Now checks CRC}
+ Stream.Read(CRCCheck, 4);
+ {$IFDEF CheckCRC}
+ CRCFile := CRCFile xor $ffffffff;
+ CRCCheck := ByteSwap(CRCCheck);
+ Result := CRCCheck = CRCFile;
+
+ {Handle CRC error}
+ if not Result then
+ begin
+ {In case it coult not load chunk}
+ Owner.RaiseError(EPngInvalidCRC, EPngInvalidCRCText);
+ exit;
+ end;
+ {$ELSE}Result := TRUE; {$ENDIF}
+end;
+
+const
+ IDATHeader: Array[0..3] of char = ('I', 'D', 'A', 'T');
+ BUFFER = 5;
+
+{Saves the IDAT chunk to a stream}
+function TChunkIDAT.SaveToStream(Stream: TStream): Boolean;
+var
+ ZLIBStream : TZStreamRec2;
+begin
+ {Get pointer to the header chunk}
+ Header := Owner.Chunks.Item[0] as TChunkIHDR;
+ {Copy image width and height}
+ ImageWidth := Header.Width;
+ ImageHeight := Header.Height;
+ Owner.GetPixelInfo(Row_Bytes, Offset); {Obtain line information}
+
+ {Allocate memory}
+ GetMem(Encode_Buffer[BUFFER], Row_Bytes);
+ ZeroMemory(Encode_Buffer[BUFFER], Row_Bytes);
+ {Allocate buffers for the filters selected}
+ {Filter none will always be calculated to the other filters to work}
+ GetMem(Encode_Buffer[FILTER_NONE], Row_Bytes);
+ ZeroMemory(Encode_Buffer[FILTER_NONE], Row_Bytes);
+ if pfSub in Owner.Filters then
+ GetMem(Encode_Buffer[FILTER_SUB], Row_Bytes);
+ if pfUp in Owner.Filters then
+ GetMem(Encode_Buffer[FILTER_UP], Row_Bytes);
+ if pfAverage in Owner.Filters then
+ GetMem(Encode_Buffer[FILTER_AVERAGE], Row_Bytes);
+ if pfPaeth in Owner.Filters then
+ GetMem(Encode_Buffer[FILTER_PAETH], Row_Bytes);
+
+ {Initialize ZLIB}
+ ZLIBStream := ZLIBInitDeflate(Stream, Owner.fCompressionLevel,
+ Owner.MaxIdatSize);
+ {Write data depending on the interlace method}
+ case Owner.InterlaceMethod of
+ imNone: EncodeNonInterlaced(stream, ZLIBStream);
+ imAdam7: EncodeInterlacedAdam7(stream, ZLIBStream);
+ end;
+ {Terminates ZLIB}
+ ZLIBTerminateDeflate(ZLIBStream);
+
+ {Release allocated memory}
+ FreeMem(Encode_Buffer[BUFFER], Row_Bytes);
+ FreeMem(Encode_Buffer[FILTER_NONE], Row_Bytes);
+ if pfSub in Owner.Filters then
+ FreeMem(Encode_Buffer[FILTER_SUB], Row_Bytes);
+ if pfUp in Owner.Filters then
+ FreeMem(Encode_Buffer[FILTER_UP], Row_Bytes);
+ if pfAverage in Owner.Filters then
+ FreeMem(Encode_Buffer[FILTER_AVERAGE], Row_Bytes);
+ if pfPaeth in Owner.Filters then
+ FreeMem(Encode_Buffer[FILTER_PAETH], Row_Bytes);
+
+ {Everything went ok}
+ Result := True;
+end;
+
+{Writes the IDAT using the settings}
+procedure WriteIDAT(Stream: TStream; Data: Pointer; const Length: Cardinal);
+var
+ ChunkLen, CRC: Cardinal;
+begin
+ {Writes IDAT header}
+ ChunkLen := ByteSwap(Length);
+ Stream.Write(ChunkLen, 4); {Chunk length}
+ Stream.Write(IDATHeader[0], 4); {Idat header}
+ CRC := update_crc($ffffffff, @IDATHeader[0], 4); {Crc part for header}
+
+ {Writes IDAT data and calculates CRC for data}
+ Stream.Write(Data^, Length);
+ CRC := Byteswap(update_crc(CRC, Data, Length) xor $ffffffff);
+ {Writes final CRC}
+ Stream.Write(CRC, 4);
+end;
+
+{Compress and writes IDAT chunk data}
+procedure TChunkIDAT.IDATZlibWrite(var ZLIBStream: TZStreamRec2;
+ Buffer: Pointer; const Length: Cardinal);
+begin
+ with ZLIBStream, ZLIBStream.ZLIB do
+ begin
+ {Set data to be compressed}
+ next_in := Buffer;
+ avail_in := Length;
+
+ {Compress all the data avaliable to compress}
+ while avail_in > 0 do
+ begin
+ deflate(ZLIB, Z_NO_FLUSH);
+
+ {The whole buffer was used, save data to stream and restore buffer}
+ if avail_out = 0 then
+ begin
+ {Writes this IDAT chunk}
+ WriteIDAT(fStream, Data, ZLIBAllocate);
+
+ {Restore buffer}
+ next_out := Data;
+ avail_out := ZLIBAllocate;
+ end {if avail_out = 0};
+
+ end {while avail_in};
+
+ end {with ZLIBStream, ZLIBStream.ZLIB}
+end;
+
+{Finishes compressing data to write IDAT chunk}
+procedure TChunkIDAT.FinishIDATZlib(var ZLIBStream: TZStreamRec2);
+begin
+ with ZLIBStream, ZLIBStream.ZLIB do
+ begin
+ {Set data to be compressed}
+ next_in := nil;
+ avail_in := 0;
+
+ while deflate(ZLIB,Z_FINISH) <> Z_STREAM_END do
+ begin
+ {Writes this IDAT chunk}
+ WriteIDAT(fStream, Data, ZLIBAllocate - avail_out);
+ {Re-update buffer}
+ next_out := Data;
+ avail_out := ZLIBAllocate;
+ end;
+
+ if avail_out < ZLIBAllocate then
+ {Writes final IDAT}
+ WriteIDAT(fStream, Data, ZLIBAllocate - avail_out);
+
+ end {with ZLIBStream, ZLIBStream.ZLIB};
+end;
+
+{Copy memory to encode RGB image with 1 byte for each color sample}
+procedure TChunkIDAT.EncodeNonInterlacedRGB8(Src, Dest, Trans: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ {Copy pixel values}
+ Byte(Dest^) := fOwner.InverseGamma[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.InverseGamma[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := fOwner.InverseGamma[pByte(Longint(Src) )^]; inc(Dest);
+ {Move to next pixel}
+ inc(Src, 3);
+ end {for I}
+end;
+
+{Copy memory to encode RGB images with 16 bits for each color sample}
+procedure TChunkIDAT.EncodeNonInterlacedRGB16(Src, Dest, Trans: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ //Now we copy from 1 byte for each sample stored to a 2 bytes (or 1 word)
+ //for sample
+ {Copy pixel values}
+ pWORD(Dest)^ := fOwner.InverseGamma[pByte(Longint(Src) + 2)^]; inc(Dest, 2);
+ pWORD(Dest)^ := fOwner.InverseGamma[pByte(Longint(Src) + 1)^]; inc(Dest, 2);
+ pWORD(Dest)^ := fOwner.InverseGamma[pByte(Longint(Src) )^]; inc(Dest, 2);
+ {Move to next pixel}
+ inc(Src, 3);
+ end {for I}
+
+end;
+
+{Copy memory to encode types using palettes (1, 4 or 8 bits per pixel)}
+procedure TChunkIDAT.EncodeNonInterlacedPalette148(Src, Dest, Trans: pChar);
+begin
+ {It's simple as copying the data}
+ CopyMemory(Dest, Src, Row_Bytes);
+end;
+
+{Copy memory to encode grayscale images with 2 bytes for each sample}
+procedure TChunkIDAT.EncodeNonInterlacedGrayscale16(Src, Dest, Trans: pChar);
+var
+ I: Integer;
+begin
+ FOR I := 1 TO ImageWidth DO
+ begin
+ //Now we copy from 1 byte for each sample stored to a 2 bytes (or 1 word)
+ //for sample
+ pWORD(Dest)^ := pByte(Longint(Src))^; inc(Dest, 2);
+ {Move to next pixel}
+ inc(Src);
+ end {for I}
+end;
+
+{Encode images using RGB followed by an alpha value using 1 byte for each}
+procedure TChunkIDAT.EncodeNonInterlacedRGBAlpha8(Src, Dest, Trans: pChar);
+var
+ i: Integer;
+begin
+ {Copy the data to the destination, including data from Trans pointer}
+ FOR i := 1 TO ImageWidth do
+ begin
+ Byte(Dest^) := Owner.InverseGamma[PByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := Owner.InverseGamma[PByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := Owner.InverseGamma[PByte(Longint(Src) )^]; inc(Dest);
+ Dest^ := Trans^; inc(Dest);
+ inc(Src, 3); inc(Trans);
+ end {for i};
+end;
+
+{Encode images using RGB followed by an alpha value using 2 byte for each}
+procedure TChunkIDAT.EncodeNonInterlacedRGBAlpha16(Src, Dest, Trans: pChar);
+var
+ i: Integer;
+begin
+ {Copy the data to the destination, including data from Trans pointer}
+ FOR i := 1 TO ImageWidth do
+ begin
+ pWord(Dest)^ := Owner.InverseGamma[PByte(Longint(Src) + 2)^]; inc(Dest, 2);
+ pWord(Dest)^ := Owner.InverseGamma[PByte(Longint(Src) + 1)^]; inc(Dest, 2);
+ pWord(Dest)^ := Owner.InverseGamma[PByte(Longint(Src) )^]; inc(Dest, 2);
+ pWord(Dest)^ := PByte(Longint(Trans) )^; inc(Dest, 2);
+ inc(Src, 3); inc(Trans);
+ end {for i};
+end;
+
+{Encode grayscale images followed by an alpha value using 1 byte for each}
+procedure TChunkIDAT.EncodeNonInterlacedGrayscaleAlpha8(
+ Src, Dest, Trans: pChar);
+var
+ i: Integer;
+begin
+ {Copy the data to the destination, including data from Trans pointer}
+ FOR i := 1 TO ImageWidth do
+ begin
+ Dest^ := Src^; inc(Dest);
+ Dest^ := Trans^; inc(Dest);
+ inc(Src); inc(Trans);
+ end {for i};
+end;
+
+{Encode grayscale images followed by an alpha value using 2 byte for each}
+procedure TChunkIDAT.EncodeNonInterlacedGrayscaleAlpha16(
+ Src, Dest, Trans: pChar);
+var
+ i: Integer;
+begin
+ {Copy the data to the destination, including data from Trans pointer}
+ FOR i := 1 TO ImageWidth do
+ begin
+ pWord(Dest)^ := pByte(Src)^; inc(Dest, 2);
+ pWord(Dest)^ := pByte(Trans)^; inc(Dest, 2);
+ inc(Src); inc(Trans);
+ end {for i};
+end;
+
+{Encode non interlaced images}
+procedure TChunkIDAT.EncodeNonInterlaced(Stream: TStream;
+ var ZLIBStream: TZStreamRec2);
+var
+ {Current line}
+ j: Cardinal;
+ {Pointers to image data}
+ Data, Trans: PChar;
+ {Filter used for this line}
+ Filter: Byte;
+ {Method which will copy the data into the buffer}
+ CopyProc: procedure(Src, Dest, Trans: pChar) of object;
+begin
+ CopyProc := nil; {Initialize to avoid warnings}
+ {Defines the method to copy the data to the buffer depending on}
+ {the image parameters}
+ case Header.ColorType of
+ {R, G, B values}
+ COLOR_RGB:
+ case Header.BitDepth of
+ 8: CopyProc := EncodeNonInterlacedRGB8;
+ 16: CopyProc := EncodeNonInterlacedRGB16;
+ end;
+ {Palette and grayscale values}
+ COLOR_GRAYSCALE, COLOR_PALETTE:
+ case Header.BitDepth of
+ 1, 4, 8: CopyProc := EncodeNonInterlacedPalette148;
+ 16: CopyProc := EncodeNonInterlacedGrayscale16;
+ end;
+ {RGB with a following alpha value}
+ COLOR_RGBALPHA:
+ case Header.BitDepth of
+ 8: CopyProc := EncodeNonInterlacedRGBAlpha8;
+ 16: CopyProc := EncodeNonInterlacedRGBAlpha16;
+ end;
+ {Grayscale images followed by an alpha}
+ COLOR_GRAYSCALEALPHA:
+ case Header.BitDepth of
+ 8: CopyProc := EncodeNonInterlacedGrayscaleAlpha8;
+ 16: CopyProc := EncodeNonInterlacedGrayscaleAlpha16;
+ end;
+ end {case Header.ColorType};
+
+ {Get the image data pointer}
+ Longint(Data) := Longint(Header.ImageData) +
+ Header.BytesPerRow * (ImageHeight - 1);
+ Trans := Header.ImageAlpha;
+
+ {Writes each line}
+ FOR j := 0 to ImageHeight - 1 do
+ begin
+ {Copy data into buffer}
+ CopyProc(Data, @Encode_Buffer[BUFFER][0], Trans);
+ {Filter data}
+ Filter := FilterToEncode;
+
+ {Compress data}
+ IDATZlibWrite(ZLIBStream, @Filter, 1);
+ IDATZlibWrite(ZLIBStream, @Encode_Buffer[Filter][0], Row_Bytes);
+
+ {Adjust pointers to the actual image data}
+ dec(Data, Header.BytesPerRow);
+ inc(Trans, ImageWidth);
+ end;
+
+ {Compress and finishes copying the remaining data}
+ FinishIDATZlib(ZLIBStream);
+end;
+
+{Copy memory to encode interlaced images using RGB value with 1 byte for}
+{each color sample}
+procedure TChunkIDAT.EncodeInterlacedRGB8(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col * 3);
+ repeat
+ {Copy this row}
+ Byte(Dest^) := fOwner.InverseGamma[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := fOwner.InverseGamma[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := fOwner.InverseGamma[pByte(Longint(Src) )^]; inc(Dest);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass] * 3);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy memory to encode interlaced RGB images with 2 bytes each color sample}
+procedure TChunkIDAT.EncodeInterlacedRGB16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col * 3);
+ repeat
+ {Copy this row}
+ pWord(Dest)^ := Owner.InverseGamma[pByte(Longint(Src) + 2)^]; inc(Dest, 2);
+ pWord(Dest)^ := Owner.InverseGamma[pByte(Longint(Src) + 1)^]; inc(Dest, 2);
+ pWord(Dest)^ := Owner.InverseGamma[pByte(Longint(Src) )^]; inc(Dest, 2);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass] * 3);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy memory to encode interlaced images using palettes using bit depths}
+{1, 4, 8 (each pixel in the image)}
+procedure TChunkIDAT.EncodeInterlacedPalette148(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+const
+ BitTable: Array[1..8] of Integer = ($1, $3, 0, $F, 0, 0, 0, $FF);
+ StartBit: Array[1..8] of Integer = (7 , 0 , 0, 4, 0, 0, 0, 0);
+var
+ CurBit, Col: Integer;
+ Src2: PChar;
+begin
+ {Clean the line}
+ fillchar(Dest^, Row_Bytes, #0);
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ with Header.BitmapInfo.bmiHeader do
+ repeat
+ {Copy data}
+ CurBit := StartBit[biBitCount];
+ repeat
+ {Adjust pointer to pixel byte bounds}
+ Src2 := pChar(Longint(Src) + (biBitCount * Col) div 8);
+ {Copy data}
+ Byte(Dest^) := Byte(Dest^) or
+ (((Byte(Src2^) shr (StartBit[Header.BitDepth] - (biBitCount * Col)
+ mod 8))) and (BitTable[biBitCount])) shl CurBit;
+
+ {Move to next column}
+ inc(Col, ColumnIncrement[Pass]);
+ {Will read next bits}
+ dec(CurBit, biBitCount);
+ until CurBit < 0;
+
+ {Move to next byte in source}
+ inc(Dest);
+ until Col >= ImageWidth;
+end;
+
+{Copy to encode interlaced grayscale images using 16 bits for each sample}
+procedure TChunkIDAT.EncodeInterlacedGrayscale16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col);
+ repeat
+ {Copy this row}
+ pWord(Dest)^ := Byte(Src^); inc(Dest, 2);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy to encode interlaced rgb images followed by an alpha value, all using}
+{one byte for each sample}
+procedure TChunkIDAT.EncodeInterlacedRGBAlpha8(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col * 3);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this row}
+ Byte(Dest^) := Owner.InverseGamma[pByte(Longint(Src) + 2)^]; inc(Dest);
+ Byte(Dest^) := Owner.InverseGamma[pByte(Longint(Src) + 1)^]; inc(Dest);
+ Byte(Dest^) := Owner.InverseGamma[pByte(Longint(Src) )^]; inc(Dest);
+ Dest^ := Trans^; inc(Dest);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass] * 3);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy to encode interlaced rgb images followed by an alpha value, all using}
+{two byte for each sample}
+procedure TChunkIDAT.EncodeInterlacedRGBAlpha16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col * 3);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this row}
+ pWord(Dest)^ := pByte(Longint(Src) + 2)^; inc(Dest, 2);
+ pWord(Dest)^ := pByte(Longint(Src) + 1)^; inc(Dest, 2);
+ pWord(Dest)^ := pByte(Longint(Src) )^; inc(Dest, 2);
+ pWord(Dest)^ := pByte(Trans)^; inc(Dest, 2);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass] * 3);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy to encode grayscale interlaced images followed by an alpha value, all}
+{using 1 byte for each sample}
+procedure TChunkIDAT.EncodeInterlacedGrayscaleAlpha8(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this row}
+ Dest^ := Src^; inc(Dest);
+ Dest^ := Trans^; inc(Dest);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass]);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Copy to encode grayscale interlaced images followed by an alpha value, all}
+{using 2 bytes for each sample}
+procedure TChunkIDAT.EncodeInterlacedGrayscaleAlpha16(const Pass: Byte;
+ Src, Dest, Trans: pChar);
+var
+ Col: Integer;
+begin
+ {Get first column and enter in loop}
+ Col := ColumnStart[Pass];
+ Src := pChar(Longint(Src) + Col);
+ Trans := pChar(Longint(Trans) + Col);
+ repeat
+ {Copy this row}
+ pWord(Dest)^ := pByte(Src)^; inc(Dest, 2);
+ pWord(Dest)^ := pByte(Trans)^; inc(Dest, 2);
+
+ {Move to next column}
+ inc(Src, ColumnIncrement[Pass]);
+ inc(Trans, ColumnIncrement[Pass]);
+ inc(Col, ColumnIncrement[Pass]);
+ until Col >= ImageWidth;
+end;
+
+{Encode interlaced images}
+procedure TChunkIDAT.EncodeInterlacedAdam7(Stream: TStream;
+ var ZLIBStream: TZStreamRec2);
+var
+ CurrentPass, Filter: Byte;
+ PixelsThisRow: Integer;
+ CurrentRow : Integer;
+ Trans, Data: pChar;
+ CopyProc: procedure(const Pass: Byte;
+ Src, Dest, Trans: pChar) of object;
+begin
+ CopyProc := nil; {Initialize to avoid warnings}
+ {Defines the method to copy the data to the buffer depending on}
+ {the image parameters}
+ case Header.ColorType of
+ {R, G, B values}
+ COLOR_RGB:
+ case Header.BitDepth of
+ 8: CopyProc := EncodeInterlacedRGB8;
+ 16: CopyProc := EncodeInterlacedRGB16;
+ end;
+ {Grayscale and palette}
+ COLOR_PALETTE, COLOR_GRAYSCALE:
+ case Header.BitDepth of
+ 1, 4, 8: CopyProc := EncodeInterlacedPalette148;
+ 16: CopyProc := EncodeInterlacedGrayscale16;
+ end;
+ {RGB followed by alpha}
+ COLOR_RGBALPHA:
+ case Header.BitDepth of
+ 8: CopyProc := EncodeInterlacedRGBAlpha8;
+ 16: CopyProc := EncodeInterlacedRGBAlpha16;
+ end;
+ COLOR_GRAYSCALEALPHA:
+ {Grayscale followed by alpha}
+ case Header.BitDepth of
+ 8: CopyProc := EncodeInterlacedGrayscaleAlpha8;
+ 16: CopyProc := EncodeInterlacedGrayscaleAlpha16;
+ end;
+ end {case Header.ColorType};
+
+ {Compress the image using the seven passes for ADAM 7}
+ FOR CurrentPass := 0 TO 6 DO
+ begin
+ {Calculates the number of pixels and bytes for this pass row}
+ PixelsThisRow := (ImageWidth - ColumnStart[CurrentPass] +
+ ColumnIncrement[CurrentPass] - 1) div ColumnIncrement[CurrentPass];
+ Row_Bytes := BytesForPixels(PixelsThisRow, Header.ColorType,
+ Header.BitDepth);
+ ZeroMemory(Encode_Buffer[FILTER_NONE], Row_Bytes);
+
+ {Get current row index}
+ CurrentRow := RowStart[CurrentPass];
+ {Get a pointer to the current row image data}
+ Data := Ptr(Longint(Header.ImageData) + Header.BytesPerRow *
+ (ImageHeight - 1 - CurrentRow));
+ Trans := Ptr(Longint(Header.ImageAlpha) + ImageWidth * CurrentRow);
+
+ {Process all the image rows}
+ if Row_Bytes > 0 then
+ while CurrentRow < ImageHeight do
+ begin
+ {Copy data into buffer}
+ CopyProc(CurrentPass, Data, @Encode_Buffer[BUFFER][0], Trans);
+ {Filter data}
+ Filter := FilterToEncode;
+
+ {Compress data}
+ IDATZlibWrite(ZLIBStream, @Filter, 1);
+ IDATZlibWrite(ZLIBStream, @Encode_Buffer[Filter][0], Row_Bytes);
+
+ {Move to the next row}
+ inc(CurrentRow, RowIncrement[CurrentPass]);
+ {Move pointer to the next line}
+ dec(Data, RowIncrement[CurrentPass] * Header.BytesPerRow);
+ inc(Trans, RowIncrement[CurrentPass] * ImageWidth);
+ end {while CurrentRow < ImageHeight}
+
+ end {CurrentPass};
+
+ {Compress and finishes copying the remaining data}
+ FinishIDATZlib(ZLIBStream);
+end;
+
+{Filters the row to be encoded and returns the best filter}
+function TChunkIDAT.FilterToEncode: Byte;
+var
+ Run, LongestRun, ii, jj: Cardinal;
+ Last, Above, LastAbove: Byte;
+begin
+ {Selecting more filters using the Filters property from TPngObject}
+ {increases the chances to the file be much smaller, but decreases}
+ {the performace}
+
+ {This method will creates the same line data using the different}
+ {filter methods and select the best}
+
+ {Sub-filter}
+ if pfSub in Owner.Filters then
+ for ii := 0 to Row_Bytes - 1 do
+ begin
+ {There is no previous pixel when it's on the first pixel, so}
+ {set last as zero when in the first}
+ if (ii >= Offset) then
+ last := Encode_Buffer[BUFFER]^[ii - Offset]
+ else
+ last := 0;
+ Encode_Buffer[FILTER_SUB]^[ii] := Encode_Buffer[BUFFER]^[ii] - last;
+ end;
+
+ {Up filter}
+ if pfUp in Owner.Filters then
+ for ii := 0 to Row_Bytes - 1 do
+ Encode_Buffer[FILTER_UP]^[ii] := Encode_Buffer[BUFFER]^[ii] -
+ Encode_Buffer[FILTER_NONE]^[ii];
+
+ {Average filter}
+ if pfAverage in Owner.Filters then
+ for ii := 0 to Row_Bytes - 1 do
+ begin
+ {Get the previous pixel, if the current pixel is the first, the}
+ {previous is considered to be 0}
+ if (ii >= Offset) then
+ last := Encode_Buffer[BUFFER]^[ii - Offset]
+ else
+ last := 0;
+ {Get the pixel above}
+ above := Encode_Buffer[FILTER_NONE]^[ii];
+
+ {Calculates formula to the average pixel}
+ Encode_Buffer[FILTER_AVERAGE]^[ii] := Encode_Buffer[BUFFER]^[ii] -
+ (above + last) div 2 ;
+ end;
+
+ {Paeth filter (the slower)}
+ if pfPaeth in Owner.Filters then
+ begin
+ {Initialize}
+ last := 0;
+ lastabove := 0;
+ for ii := 0 to Row_Bytes - 1 do
+ begin
+ {In case this pixel is not the first in the line obtains the}
+ {previous one and the one above the previous}
+ if (ii >= Offset) then
+ begin
+ last := Encode_Buffer[BUFFER]^[ii - Offset];
+ lastabove := Encode_Buffer[FILTER_NONE]^[ii - Offset];
+ end;
+ {Obtains the pixel above}
+ above := Encode_Buffer[FILTER_NONE]^[ii];
+ {Calculate paeth filter for this byte}
+ Encode_Buffer[FILTER_PAETH]^[ii] := Encode_Buffer[BUFFER]^[ii] -
+ PaethPredictor(last, above, lastabove);
+ end;
+ end;
+
+ {Now calculates the same line using no filter, which is necessary}
+ {in order to have data to the filters when the next line comes}
+ CopyMemory(@Encode_Buffer[FILTER_NONE]^[0],
+ @Encode_Buffer[BUFFER]^[0], Row_Bytes);
+
+ {If only filter none is selected in the filter list, we don't need}
+ {to proceed and further}
+ if (Owner.Filters = [pfNone]) or (Owner.Filters = []) then
+ begin
+ Result := FILTER_NONE;
+ exit;
+ end {if (Owner.Filters = [pfNone...};
+
+ {Check which filter is the best by checking which has the larger}
+ {sequence of the same byte, since they are best compressed}
+ LongestRun := 0; Result := FILTER_NONE;
+ for ii := FILTER_NONE TO FILTER_PAETH do
+ {Check if this filter was selected}
+ if TFilter(ii) in Owner.Filters then
+ begin
+ Run := 0;
+ {Check if it's the only filter}
+ if Owner.Filters = [TFilter(ii)] then
+ begin
+ Result := ii;
+ exit;
+ end;
+
+ {Check using a sequence of four bytes}
+ for jj := 2 to Row_Bytes - 1 do
+ if (Encode_Buffer[ii]^[jj] = Encode_Buffer [ii]^[jj-1]) or
+ (Encode_Buffer[ii]^[jj] = Encode_Buffer [ii]^[jj-2]) then
+ inc(Run); {Count the number of sequences}
+
+ {Check if this one is the best so far}
+ if (Run > LongestRun) then
+ begin
+ Result := ii;
+ LongestRun := Run;
+ end {if (Run > LongestRun)};
+
+ end {if TFilter(ii) in Owner.Filters};
+end;
+
+{TChunkPLTE implementation}
+
+{Returns an item in the palette}
+function TChunkPLTE.GetPaletteItem(Index: Byte): TRGBQuad;
+begin
+ {Test if item is valid, if not raise error}
+ if Index > Count - 1 then
+ Owner.RaiseError(EPNGError, EPNGUnknownPalEntryText)
+ else
+ {Returns the item}
+ Result := Header.BitmapInfo.bmiColors[Index];
+end;
+
+{Loads the palette chunk from a stream}
+function TChunkPLTE.LoadFromStream(Stream: TStream;
+ const ChunkName: TChunkName; Size: Integer): Boolean;
+type
+ pPalEntry = ^PalEntry;
+ PalEntry = record r, g, b: Byte end;
+var
+ j : Integer; {For the FOR}
+ PalColor : pPalEntry;
+begin
+ {Let ancestor load data and check CRC}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+ if not Result then exit;
+
+ {This chunk must be divisible by 3 in order to be valid}
+ if (Size mod 3 <> 0) or (Size div 3 > 256) then
+ begin
+ {Raise error}
+ Result := FALSE;
+ Owner.RaiseError(EPNGInvalidPalette, EPNGInvalidPaletteText);
+ exit;
+ end {if Size mod 3 <> 0};
+
+ {Fill array with the palette entries}
+ fCount := Size div 3;
+ PalColor := Data;
+ FOR j := 0 TO fCount - 1 DO
+ with Header.BitmapInfo.bmiColors[j] do
+ begin
+ rgbRed := Owner.GammaTable[PalColor.r];
+ rgbGreen := Owner.GammaTable[PalColor.g];
+ rgbBlue := Owner.GammaTable[PalColor.b];
+ rgbReserved := 0;
+ inc(PalColor); {Move to next palette entry}
+ end;
+end;
+
+{Saves the PLTE chunk to a stream}
+function TChunkPLTE.SaveToStream(Stream: TStream): Boolean;
+var
+ J: Integer;
+ DataPtr: pByte;
+begin
+ {Adjust size to hold all the palette items}
+ ResizeData(fCount * 3);
+ {Copy pointer to data}
+ DataPtr := fData;
+
+ {Copy palette items}
+ with Header do
+ FOR j := 0 TO fCount - 1 DO
+ with BitmapInfo.bmiColors[j] do
+ begin
+ DataPtr^ := Owner.InverseGamma[rgbRed]; inc(DataPtr);
+ DataPtr^ := Owner.InverseGamma[rgbGreen]; inc(DataPtr);
+ DataPtr^ := Owner.InverseGamma[rgbBlue]; inc(DataPtr);
+ end {with BitmapInfo};
+
+ {Let ancestor do the rest of the work}
+ Result := inherited SaveToStream(Stream);
+end;
+
+{Assigns from another PLTE chunk}
+procedure TChunkPLTE.Assign(Source: TChunk);
+begin
+ {Copy the number of palette items}
+ if Source is TChunkPLTE then
+ fCount := TChunkPLTE(Source).fCount
+ else
+ Owner.RaiseError(EPNGError, EPNGCannotAssignChunkText);
+end;
+
+{TChunkgAMA implementation}
+
+{Assigns from another chunk}
+procedure TChunkgAMA.Assign(Source: TChunk);
+begin
+ {Copy the gamma value}
+ if Source is TChunkgAMA then
+ Gamma := TChunkgAMA(Source).Gamma
+ else
+ Owner.RaiseError(EPNGError, EPNGCannotAssignChunkText);
+end;
+
+{Gamma chunk being created}
+constructor TChunkgAMA.Create(Owner: TPngObject);
+begin
+ {Call ancestor}
+ inherited Create(Owner);
+ Gamma := 1; {Initial value}
+end;
+
+{Returns gamma value}
+function TChunkgAMA.GetValue: Cardinal;
+begin
+ {Make sure that the size is four bytes}
+ if DataSize <> 4 then
+ begin
+ {Adjust size and returns 1}
+ ResizeData(4);
+ Result := 1;
+ end
+ {If it's right, read the value}
+ else Result := Cardinal(ByteSwap(pCardinal(Data)^))
+end;
+
+function Power(Base, Exponent: Extended): Extended;
+begin
+ if Exponent = 0.0 then
+ Result := 1.0 {Math rule}
+ else if (Base = 0) or (Exponent = 0) then Result := 0
+ else
+ Result := Exp(Exponent * Ln(Base));
+end;
+
+
+{Loading the chunk from a stream}
+function TChunkgAMA.LoadFromStream(Stream: TStream;
+ const ChunkName: TChunkName; Size: Integer): Boolean;
+var
+ i: Integer;
+ Value: Cardinal;
+begin
+ {Call ancestor and test if it went ok}
+ Result := inherited LoadFromStream(Stream, ChunkName, Size);
+ if not Result then exit;
+ Value := Gamma;
+ {Build gamma table and inverse table for saving}
+ if Value <> 0 then
+ with Owner do
+ FOR i := 0 TO 255 DO
+ begin
+ GammaTable[I] := Round(Power((I / 255), 1 /
+ (Value / 100000 * 2.2)) * 255);
+ InverseGamma[Round(Power((I / 255), 1 /
+ (Value / 100000 * 2.2)) * 255)] := I;
+ end
+end;
+
+{Sets the gamma value}
+procedure TChunkgAMA.SetValue(const Value: Cardinal);
+begin
+ {Make sure that the size is four bytes}
+ if DataSize <> 4 then ResizeData(4);
+ {If it's right, set the value}
+ pCardinal(Data)^ := ByteSwap(Value);
+end;
+
+{TPngObject implementation}
+
+{Assigns from another object}
+procedure TPngObject.Assign(Source: TPersistent);
+begin
+ {Assigns contents from another TPNGObject}
+ if Source is TPNGObject then
+ AssignPNG(Source as TPNGObject)
+ {Copy contents from a TBitmap}
+ {$IFDEF UseDelphi}else if Source is TBitmap then
+ with Source as TBitmap do
+ AssignHandle(Handle, Transparent,
+ ColorToRGB(TransparentColor)){$ENDIF}
+ {Unknown source, let ancestor deal with it}
+ else
+ inherited;
+end;
+
+{Clear all the chunks in the list}
+procedure TPngObject.ClearChunks;
+var
+ i: Integer;
+begin
+ {Initialize gamma}
+ InitializeGamma();
+ {Free all the objects and memory (0 chunks Bug fixed by Noel Sharpe)}
+ for i := 0 TO Integer(Chunks.Count) - 1 do
+ TChunk(Chunks.Item[i]).Free;
+ Chunks.Count := 0;
+end;
+
+{Portable Network Graphics object being created}
+constructor TPngObject.Create;
+begin
+ {Let it be created}
+ inherited Create;
+
+ {Initial properties}
+ TempPalette := 0;
+ fFilters := [pfSub];
+ fCompressionLevel := 7;
+ fInterlaceMethod := imNone;
+ fMaxIdatSize := High(Word);
+ {Create chunklist object}
+ fChunkList := TPngList.Create(Self);
+end;
+
+{Portable Network Graphics object being destroyed}
+destructor TPngObject.Destroy;
+begin
+ {Free object list}
+ ClearChunks;
+ fChunkList.Free;
+ {Free the temporary palette}
+ if TempPalette <> 0 then DeleteObject(TempPalette);
+
+ {Call ancestor destroy}
+ inherited Destroy;
+end;
+
+{Returns linesize and byte offset for pixels}
+procedure TPngObject.GetPixelInfo(var LineSize, Offset: Cardinal);
+begin
+ {There must be an Header chunk to calculate size}
+ if HeaderPresent then
+ begin
+ {Calculate number of bytes for each line}
+ LineSize := BytesForPixels(Header.Width, Header.ColorType, Header.BitDepth);
+
+ {Calculates byte offset}
+ Case Header.ColorType of
+ {Grayscale}
+ COLOR_GRAYSCALE:
+ If Header.BitDepth = 16 Then
+ Offset := 2
+ Else
+ Offset := 1 ;
+ {It always smaller or equal one byte, so it occupes one byte}
+ COLOR_PALETTE:
+ offset := 1;
+ {It might be 3 or 6 bytes}
+ COLOR_RGB:
+ offset := 3 * Header.BitDepth Div 8;
+ {It might be 2 or 4 bytes}
+ COLOR_GRAYSCALEALPHA:
+ offset := 2 * Header.BitDepth Div 8;
+ {4 or 8 bytes}
+ COLOR_RGBALPHA:
+ offset := 4 * Header.BitDepth Div 8;
+ else
+ Offset := 0;
+ End ;
+
+ end
+ else
+ begin
+ {In case if there isn't any Header chunk}
+ Offset := 0;
+ LineSize := 0;
+ end;
+
+end;
+
+{Returns image height}
+function TPngObject.GetHeight: Integer;
+begin
+ {There must be a Header chunk to get the size, otherwise returns 0}
+ if HeaderPresent then
+ Result := TChunkIHDR(Chunks.Item[0]).Height
+ else Result := 0;
+end;
+
+{Returns image width}
+function TPngObject.GetWidth: Integer;
+begin
+ {There must be a Header chunk to get the size, otherwise returns 0}
+ if HeaderPresent then
+ Result := Header.Width
+ else Result := 0;
+end;
+
+{Returns if the image is empty}
+function TPngObject.GetEmpty: Boolean;
+begin
+ Result := (Chunks.Count = 0);
+end;
+
+{Raises an error}
+procedure TPngObject.RaiseError(ExceptionClass: ExceptClass; Text: String);
+begin
+ raise ExceptionClass.Create(Text);
+end;
+
+{Set the maximum size for IDAT chunk}
+procedure TPngObject.SetMaxIdatSize(const Value: Cardinal);
+begin
+ {Make sure the size is at least 65535}
+ if Value < High(Word) then
+ fMaxIdatSize := High(Word) else fMaxIdatSize := Value;
+end;
+
+{$IFNDEF UseDelphi}
+ {Creates a file stream reading from the filename in the parameter and load}
+ procedure TPngObject.LoadFromFile(const Filename: String);
+ var
+ FileStream: TFileStream;
+ begin
+ {Test if the file exists}
+ if not FileExists(Filename) then
+ begin
+ {In case it does not exists, raise error}
+ RaiseError(EPNGNotExists, EPNGNotExistsText);
+ exit;
+ end;
+
+ {Creates the file stream to read}
+ FileStream := TFileStream.Create(Filename, [fsmRead]);
+ LoadFromStream(FileStream); {Loads the data}
+ FileStream.Free; {Free file stream}
+ end;
+
+ {Saves the current png image to a file}
+ procedure TPngObject.SaveToFile(const Filename: String);
+ var
+ FileStream: TFileStream;
+ begin
+ {Creates the file stream to write}
+ FileStream := TFileStream.Create(Filename, [fsmWrite]);
+ SaveToStream(FileStream); {Saves the data}
+ FileStream.Free; {Free file stream}
+ end;
+
+{$ENDIF}
+
+{Returns pointer to the chunk TChunkIHDR which should be the first}
+function TPngObject.GetHeader: TChunkIHDR;
+begin
+ {If there is a TChunkIHDR returns it, otherwise returns nil}
+ if (Chunks.Count <> 0) and (Chunks.Item[0] is TChunkIHDR) then
+ Result := Chunks.Item[0] as TChunkIHDR
+ else
+ begin
+ {No header, throw error message}
+ RaiseError(EPNGHeaderNotPresent, EPNGHeaderNotPresentText);
+ Result := nil
+ end
+end;
+
+{Draws using partial transparency}
+{THANY: -1*Header.Height changed to -Integer(Header.Height) to prevent range errors}
+procedure TPngObject.DrawPartialTrans(DC: HDC; Rect: TRect);
+type
+ {Access to pixels}
+ TPixelLine = Array[Word] of TRGBQuad;
+ pPixelLine = ^TPixelLine;
+const
+ {Structure used to create the bitmap}
+ BitmapInfoHeader: TBitmapInfoHeader =
+ (biSize: sizeof(TBitmapInfoHeader);
+ biWidth: 100;
+ biHeight: 100;
+ biPlanes: 1;
+ biBitCount: 32;
+ biCompression: BI_RGB;
+ biSizeImage: 0;
+ biXPelsPerMeter: 0;
+ biYPelsPerMeter: 0;
+ biClrUsed: 0;
+ biClrImportant: 0);
+var
+ {Buffer bitmap creation}
+ BitmapInfo : TBitmapInfo;
+ BufferDC : HDC;
+ BufferBits : Pointer;
+ OldBitmap,
+ BufferBitmap: HBitmap;
+
+ {Transparency/palette chunks}
+ TransparencyChunk: TChunktRNS;
+ PaletteChunk: TChunkPLTE;
+ TransValue, PaletteIndex: Byte;
+ CurBit: Integer;
+ Data: PByte;
+
+ {Buffer bitmap modification}
+ BytesPerRowDest,
+ BytesPerRowSrc,
+ BytesPerRowAlpha: Integer;
+ ImageSource,
+ AlphaSource : pByteArray;
+ ImageData : pPixelLine;
+ i, j : Integer;
+begin
+ {Prepare to create the bitmap}
+ Fillchar(BitmapInfo, sizeof(BitmapInfo), #0);
+ BitmapInfoHeader.biWidth := Header.Width;
+ BitmapInfoHeader.biHeight := -Integer(Header.Height);
+ BitmapInfo.bmiHeader := BitmapInfoHeader;
+
+ {Create the bitmap which will receive the background, the applied}
+ {alpha blending and then will be painted on the background}
+ BufferDC := CreateCompatibleDC(0);
+ {In case BufferDC could not be created}
+ if (BufferDC = 0) then RaiseError(EPNGOutMemory, EPNGOutMemoryText);
+ BufferBitmap := CreateDIBSection(BufferDC, BitmapInfo, DIB_RGB_COLORS,
+ BufferBits, 0, 0);
+ {In case buffer bitmap could not be created}
+ if (BufferBitmap = 0) or (BufferBits = Nil) then
+ begin
+ if BufferBitmap <> 0 then DeleteObject(BufferBitmap);
+ DeleteDC(BufferDC);
+ RaiseError(EPNGOutMemory, EPNGOutMemoryText);
+ end;
+
+ {Selects new bitmap and release old bitmap}
+ OldBitmap := SelectObject(BufferDC, BufferBitmap);
+
+ {Draws the background on the buffer image}
+ StretchBlt(BufferDC, 0, 0, Header.Width, Header.height, DC, Rect.Left,
+ Rect.Top, Header.Width, Header.Height, SRCCOPY);
+
+ {Obtain number of bytes for each row}
+ BytesPerRowAlpha := Header.Width;
+ BytesPerRowDest := (((BitmapInfo.bmiHeader.biBitCount * Width) + 31)
+ and not 31) div 8; {Number of bytes for each image row in destination}
+ BytesPerRowSrc := (((Header.BitmapInfo.bmiHeader.biBitCount * Header.Width) +
+ 31) and not 31) div 8; {Number of bytes for each image row in source}
+
+ {Obtains image pointers}
+ ImageData := BufferBits;
+ AlphaSource := Header.ImageAlpha;
+ Longint(ImageSource) := Longint(Header.ImageData) +
+ Header.BytesPerRow * Longint(Header.Height - 1);
+
+ case Header.BitmapInfo.bmiHeader.biBitCount of
+ {R, G, B images}
+ 24:
+ FOR j := 1 TO Header.Height DO
+ begin
+ {Process all the pixels in this line}
+ FOR i := 0 TO Header.Width - 1 DO
+ with ImageData[i] do
+ begin
+ rgbRed := (255+ImageSource[2+i*3] * AlphaSource[i] + rgbRed * (255 -
+ AlphaSource[i])) shr 8;
+ rgbGreen := (255+ImageSource[1+i*3] * AlphaSource[i] + rgbGreen *
+ (255 - AlphaSource[i])) shr 8;
+ rgbBlue := (255+ImageSource[i*3] * AlphaSource[i] + rgbBlue *
+ (255 - AlphaSource[i])) shr 8;
+ end;
+
+ {Move pointers}
+ Longint(ImageData) := Longint(ImageData) + BytesPerRowDest;
+ Longint(ImageSource) := Longint(ImageSource) - BytesPerRowSrc;
+ Longint(AlphaSource) := Longint(AlphaSource) + BytesPerRowAlpha;
+ end;
+ {Palette images with 1 byte for each pixel}
+ 1,4,8: if Header.ColorType = COLOR_GRAYSCALEALPHA then
+ FOR j := 1 TO Header.Height DO
+ begin
+ {Process all the pixels in this line}
+ FOR i := 0 TO Header.Width - 1 DO
+ with ImageData[i], Header.BitmapInfo do begin
+ rgbRed := (255 + ImageSource[i] * AlphaSource[i] +
+ rgbRed * (255 - AlphaSource[i])) shr 8;
+ rgbGreen := (255 + ImageSource[i] * AlphaSource[i] +
+ rgbGreen * (255 - AlphaSource[i])) shr 8;
+ rgbBlue := (255 + ImageSource[i] * AlphaSource[i] +
+ rgbBlue * (255 - AlphaSource[i])) shr 8;
+ end;
+
+ {Move pointers}
+ Longint(ImageData) := Longint(ImageData) + BytesPerRowDest;
+ Longint(ImageSource) := Longint(ImageSource) - BytesPerRowSrc;
+ Longint(AlphaSource) := Longint(AlphaSource) + BytesPerRowAlpha;
+ end
+ else {Palette images}
+ begin
+ {Obtain pointer to the transparency chunk}
+ TransparencyChunk := TChunktRNS(Chunks.ItemFromClass(TChunktRNS));
+ PaletteChunk := TChunkPLTE(Chunks.ItemFromClass(TChunkPLTE));
+
+ FOR j := 1 TO Header.Height DO
+ begin
+ {Process all the pixels in this line}
+ i := 0; Data := @ImageSource[0];
+ repeat
+ CurBit := 0;
+
+ repeat
+ {Obtains the palette index}
+ case Header.BitDepth of
+ 1: PaletteIndex := (Data^ shr (7-(I Mod 8))) and 1;
+ 2,4: PaletteIndex := (Data^ shr ((1-(I Mod 2))*4)) and $0F;
+ else PaletteIndex := Data^;
+ end;
+
+ {Updates the image with the new pixel}
+ with ImageData[i] do
+ begin
+ TransValue := TransparencyChunk.PaletteValues[PaletteIndex];
+ rgbRed := (255 + PaletteChunk.Item[PaletteIndex].rgbRed *
+ TransValue + rgbRed * (255 - TransValue)) shr 8;
+ rgbGreen := (255 + PaletteChunk.Item[PaletteIndex].rgbGreen *
+ TransValue + rgbGreen * (255 - TransValue)) shr 8;
+ rgbBlue := (255 + PaletteChunk.Item[PaletteIndex].rgbBlue *
+ TransValue + rgbBlue * (255 - TransValue)) shr 8;
+ end;
+
+ {Move to next data}
+ inc(i); inc(CurBit, Header.BitmapInfo.bmiHeader.biBitCount);
+ until CurBit >= 8;
+ {Move to next source data}
+ inc(Data);
+ until i >= Integer(Header.Width);
+
+ {Move pointers}
+ Longint(ImageData) := Longint(ImageData) + BytesPerRowDest;
+ Longint(ImageSource) := Longint(ImageSource) - BytesPerRowSrc;
+ end
+ end {Palette images}
+ end {case Header.BitmapInfo.bmiHeader.biBitCount};
+
+ {Draws the new bitmap on the foreground}
+ StretchBlt(DC, Rect.Left, Rect.Top, Header.Width, Header.Height, BufferDC,
+ 0, 0, Header.Width, Header.Height, SRCCOPY);
+
+ {Free bitmap}
+ SelectObject(BufferDC, OldBitmap);
+ DeleteObject(BufferBitmap);
+ DeleteDC(BufferDC);
+end;
+
+{Draws the image into a canvas}
+procedure TPngObject.Draw(ACanvas: TCanvas; const Rect: TRect);
+var
+ Header: TChunkIHDR;
+begin
+ {Quit in case there is no header, otherwise obtain it}
+ if (Chunks.Count = 0) or not (Chunks.GetItem(0) is TChunkIHDR) then Exit;
+ Header := Chunks.GetItem(0) as TChunkIHDR;
+
+ {Copy the data to the canvas}
+ case Self.TransparencyMode of
+ {$IFDEF PartialTransparentDraw}
+ ptmPartial:
+ DrawPartialTrans(ACanvas{$IFDEF UseDelphi}.Handle{$ENDIF}, Rect);
+ {$ENDIF}
+ ptmBit: DrawTransparentBitmap(ACanvas{$IFDEF UseDelphi}.Handle{$ENDIF},
+ Header.ImageData, Header.BitmapInfo.bmiHeader,
+ pBitmapInfo(@Header.BitmapInfo), Rect,
+ {$IFDEF UseDelphi}ColorToRGB({$ENDIF}TransparentColor)
+ {$IFDEF UseDelphi}){$ENDIF}
+ else
+ StretchDiBits(ACanvas{$IFDEF UseDelphi}.Handle{$ENDIF}, Rect.Left,
+ Rect.Top, Rect.Right - Rect.Left, Rect.Bottom - Rect.Top, 0, 0,
+ Header.Width, Header.Height, Header.ImageData,
+ pBitmapInfo(@Header.BitmapInfo)^, DIB_RGB_COLORS, SRCCOPY)
+ end {case}
+end;
+
+{Characters for the header}
+const
+ PngHeader: Array[0..7] of Char = (#137, #80, #78, #71, #13, #10, #26, #10);
+
+{Loads the image from a stream of data}
+procedure TPngObject.LoadFromStream(Stream: TStream);
+var
+ Header : Array[0..7] of Char;
+ HasIDAT : Boolean;
+
+ {Chunks reading}
+ ChunkCount : Cardinal;
+ ChunkLength: Cardinal;
+ ChunkName : TChunkName;
+begin
+ {Initialize before start loading chunks}
+ ChunkCount := 0;
+ ClearChunks();
+ {Reads the header}
+ Stream.Read(Header[0], 8);
+
+ {Test if the header matches}
+ if Header <> PngHeader then
+ begin
+ RaiseError(EPNGInvalidFileHeader, EPNGInvalidFileHeaderText);
+ Exit;
+ end;
+
+
+ HasIDAT := FALSE;
+ Chunks.Count := 10;
+
+ {Load chunks}
+ repeat
+ inc(ChunkCount); {Increment number of chunks}
+ if Chunks.Count < ChunkCount then {Resize the chunks list if needed}
+ Chunks.Count := Chunks.Count + 10;
+
+ {Reads chunk length and invert since it is in network order}
+ {also checks the Read method return, if it returns 0, it}
+ {means that no bytes was readed, probably because it reached}
+ {the end of the file}
+ if Stream.Read(ChunkLength, 4) = 0 then
+ begin
+ {In case it found the end of the file here}
+ Chunks.Count := ChunkCount - 1;
+ RaiseError(EPNGUnexpectedEnd, EPNGUnexpectedEndText);
+ end;
+
+ ChunkLength := ByteSwap(ChunkLength);
+ {Reads chunk name}
+ Stream.Read(Chunkname, 4);
+
+ {Here we check if the first chunk is the Header which is necessary}
+ {to the file in order to be a valid Portable Network Graphics image}
+ if (ChunkCount = 1) and (ChunkName <> 'IHDR') then
+ begin
+ Chunks.Count := ChunkCount - 1;
+ RaiseError(EPNGIHDRNotFirst, EPNGIHDRNotFirstText);
+ exit;
+ end;
+
+ {Has a previous IDAT}
+ if (HasIDAT and (ChunkName = 'IDAT')) or (ChunkName = 'cHRM') then
+ begin
+ dec(ChunkCount);
+ Stream.Seek(ChunkLength + 4, soFromCurrent);
+ Continue;
+ end;
+ {Tell it has an IDAT chunk}
+ if ChunkName = 'IDAT' then HasIDAT := TRUE;
+
+ {Creates object for this chunk}
+ Chunks.SetItem(ChunkCount - 1, CreateClassChunk(Self, ChunkName));
+
+ {Check if the chunk is critical and unknown}
+ {$IFDEF ErrorOnUnknownCritical}
+ if (TChunk(Chunks.Item[ChunkCount - 1]).ClassType = TChunk) and
+ ((Byte(ChunkName[0]) AND $20) = 0) and (ChunkName <> '') then
+ begin
+ Chunks.Count := ChunkCount;
+ RaiseError(EPNGUnknownCriticalChunk, EPNGUnknownCriticalChunkText);
+ end;
+ {$ENDIF}
+
+ {Loads it}
+ try if not TChunk(Chunks.Item[ChunkCount - 1]).LoadFromStream(Stream,
+ ChunkName, ChunkLength) then break;
+ except
+ Chunks.Count := ChunkCount;
+ raise;
+ end;
+
+ {Terminates when it reaches the IEND chunk}
+ until (ChunkName = 'IEND');
+
+ {Resize the list to the appropriate size}
+ Chunks.Count := ChunkCount;
+
+ {Check if there is data}
+ if not HasIDAT then
+ RaiseError(EPNGNoImageData, EPNGNoImageDataText);
+end;
+
+{Changing height is not supported}
+procedure TPngObject.SetHeight(Value: Integer);
+begin
+ RaiseError(EPNGError, EPNGCannotChangeSizeText);
+end;
+
+{Changing width is not supported}
+procedure TPngObject.SetWidth(Value: Integer);
+begin
+ RaiseError(EPNGError, EPNGCannotChangeSizeText);
+end;
+
+{$IFDEF UseDelphi}
+{Saves to clipboard format (thanks to Antoine Pottern)}
+procedure TPNGObject.SaveToClipboardFormat(var AFormat: Word;
+ var AData: THandle; var APalette: HPalette);
+begin
+ with TBitmap.Create do
+ try
+ Width := Self.Width;
+ Height := Self.Height;
+ Self.Draw(Canvas, Rect(0, 0, Width, Height));
+ SaveToClipboardFormat(AFormat, AData, APalette);
+ finally
+ Free;
+ end {try}
+end;
+
+{Loads data from clipboard}
+procedure TPngObject.LoadFromClipboardFormat(AFormat: Word;
+ AData: THandle; APalette: HPalette);
+begin
+ with TBitmap.Create do
+ try
+ LoadFromClipboardFormat(AFormat, AData, APalette);
+ Self.AssignHandle(Handle, False, 0);
+ finally
+ Free;
+ end {try}
+end;
+
+{Returns if the image is transparent}
+function TPngObject.GetTransparent: Boolean;
+begin
+ Result := (TransparencyMode <> ptmNone);
+end;
+
+{$ENDIF}
+
+{Saving the PNG image to a stream of data}
+procedure TPngObject.SaveToStream(Stream: TStream);
+var
+ j: Integer;
+begin
+ {Reads the header}
+ Stream.Write(PNGHeader[0], 8);
+ {Write each chunk}
+ FOR j := 0 TO Chunks.Count - 1 DO
+ Chunks.Item[j].SaveToStream(Stream)
+end;
+
+{Prepares the Header chunk}
+procedure BuildHeader(Header: TChunkIHDR; Handle: HBitmap; Info: pBitmap;
+ HasPalette: Boolean);
+var
+ DC: HDC;
+begin
+ {Set width and height}
+ Header.Width := Info.bmWidth;
+ Header.Height := abs(Info.bmHeight);
+ {Set bit depth}
+ if Info.bmBitsPixel >= 16 then
+ Header.BitDepth := 8 else Header.BitDepth := Info.bmBitsPixel;
+ {Set color type}
+ if Info.bmBitsPixel >= 16 then
+ Header.ColorType := COLOR_RGB else Header.ColorType := COLOR_PALETTE;
+ {Set other info}
+ Header.CompressionMethod := 0; {deflate/inflate}
+ Header.InterlaceMethod := 0; {no interlace}
+
+ {Prepares bitmap headers to hold data}
+ Header.PrepareImageData();
+ {Copy image data}
+ DC := CreateCompatibleDC(0);
+ GetDIBits(DC, Handle, 0, Header.Height, Header.ImageData,
+ pBitmapInfo(@Header.BitmapInfo)^, DIB_RGB_COLORS);
+ DeleteDC(DC);
+end;
+
+{Loads the image from a resource}
+procedure TPngObject.LoadFromResourceName(Instance: HInst;
+ const Name: String);
+var
+ ResStream: TResourceStream;
+begin
+ {Creates an especial stream to load from the resource}
+ try ResStream := TResourceStream.Create(Instance, Name, RT_RCDATA);
+ except RaiseError(EPNGCouldNotLoadResource, EPNGCouldNotLoadResourceText);
+ exit; end;
+
+ {Loads the png image from the resource}
+ try
+ LoadFromStream(ResStream);
+ finally
+ ResStream.Free;
+ end;
+end;
+
+{Loads the png from a resource ID}
+procedure TPngObject.LoadFromResourceID(Instance: HInst; ResID: Integer);
+begin
+ LoadFromResourceName(Instance, String(ResID));
+end;
+
+{Assigns this tpngobject to another object}
+procedure TPngObject.AssignTo(Dest: TPersistent);
+{$IFDEF UseDelphi}
+var
+ DeskDC: HDC;
+ TRNS: TChunkTRNS;
+{$ENDIF}
+begin
+ {If the destination is also a TPNGObject make it assign}
+ {this one}
+ if Dest is TPNGObject then
+ TPNGObject(Dest).AssignPNG(Self)
+ {$IFDEF UseDelphi}
+ {In case the destination is a bitmap}
+ else if (Dest is TBitmap) and HeaderPresent then
+ begin
+ {Device context}
+ DeskDC := GetDC(0);
+ {Copy the data}
+ TBitmap(Dest).Handle := CreateDIBitmap(DeskDC,
+ Header.BitmapInfo.bmiHeader, CBM_INIT, Header.ImageData,
+ pBitmapInfo(@Header.BitmapInfo)^, DIB_RGB_COLORS);
+ ReleaseDC(0, DeskDC);
+ {Tests for the best pixelformat}
+ case Header.BitmapInfo.bmiHeader.biBitCount of
+ 1: TBitmap(Dest).PixelFormat := pf1Bit;
+ 4: TBitmap(Dest).PixelFormat := pf4Bit;
+ 8: TBitmap(Dest).PixelFormat := pf8Bit;
+ 24: TBitmap(Dest).PixelFormat := pf24Bit;
+ 32: TBitmap(Dest).PixelFormat := pf32Bit;
+ end {case Header.BitmapInfo.bmiHeader.biBitCount};
+
+ {Copy transparency mode}
+ if (TransparencyMode = ptmBit) then
+ begin
+ TRNS := Chunks.ItemFromClass(TChunkTRNS) as TChunkTRNS;
+ TBitmap(Dest).TransparentColor := TRNS.TransparentColor;
+ TBitmap(Dest).Transparent := True
+ end {if (TransparencyMode = ptmBit)}
+
+ end
+ else
+ {Unknown destination kind, }
+ inherited AssignTo(Dest);
+ {$ENDIF}
+end;
+
+{Assigns from a bitmap object}
+procedure TPngObject.AssignHandle(Handle: HBitmap; Transparent: Boolean;
+ TransparentColor: ColorRef);
+var
+ BitmapInfo: Windows.TBitmap;
+ HasPalette: Boolean;
+
+ {Chunks}
+ Header: TChunkIHDR;
+ PLTE: TChunkPLTE;
+ IDAT: TChunkIDAT;
+ IEND: TChunkIEND;
+ TRNS: TChunkTRNS;
+begin
+ {Obtain bitmap info}
+ GetObject(Handle, SizeOf(BitmapInfo), @BitmapInfo);
+
+ {Only bit depths 1, 4 and 8 needs a palette}
+ HasPalette := (BitmapInfo.bmBitsPixel < 16);
+
+ {Clear old chunks and prepare}
+ ClearChunks();
+
+ {Create the chunks}
+ Header := TChunkIHDR.Create(Self);
+ if HasPalette then PLTE := TChunkPLTE.Create(Self) else PLTE := nil;
+ if Transparent then TRNS := TChunkTRNS.Create(Self) else TRNS := nil;
+ IDAT := TChunkIDAT.Create(Self);
+ IEND := TChunkIEND.Create(Self);
+
+ {Add chunks}
+ TPNGPointerList(Chunks).Add(Header);
+ if HasPalette then TPNGPointerList(Chunks).Add(PLTE);
+ if Transparent then TPNGPointerList(Chunks).Add(TRNS);
+ TPNGPointerList(Chunks).Add(IDAT);
+ TPNGPointerList(Chunks).Add(IEND);
+
+ {This method will fill the Header chunk with bitmap information}
+ {and copy the image data}
+ BuildHeader(Header, Handle, @BitmapInfo, HasPalette);
+ {In case there is a image data, set the PLTE chunk fCount variable}
+ {to the actual number of palette colors which is 2^(Bits for each pixel)}
+ if HasPalette then PLTE.fCount := 1 shl BitmapInfo.bmBitsPixel;
+
+ {In case it is a transparent bitmap, prepares it}
+ if Transparent then TRNS.TransparentColor := TransparentColor;
+
+end;
+
+{Assigns from another PNG}
+procedure TPngObject.AssignPNG(Source: TPNGObject);
+var
+ J: Integer;
+begin
+ {Copy properties}
+ InterlaceMethod := Source.InterlaceMethod;
+ MaxIdatSize := Source.MaxIdatSize;
+ CompressionLevel := Source.CompressionLevel;
+ Filters := Source.Filters;
+
+ {Clear old chunks and prepare}
+ ClearChunks();
+ Chunks.Count := Source.Chunks.Count;
+ {Create chunks and makes a copy from the source}
+ FOR J := 0 TO Chunks.Count - 1 DO
+ with Source.Chunks do
+ begin
+ Chunks.SetItem(J, TChunkClass(TChunk(Item[J]).ClassType).Create(Self));
+ TChunk(Chunks.Item[J]).Assign(TChunk(Item[J]));
+ end {with};
+end;
+
+{Returns a alpha data scanline}
+function TPngObject.GetAlphaScanline(const LineIndex: Integer): pByteArray;
+begin
+ with Header do
+ if (ColorType = COLOR_RGBALPHA) or (ColorType = COLOR_GRAYSCALEALPHA) then
+ Longint(Result) := Longint(ImageAlpha) + (LineIndex * Longint(Width))
+ else Result := nil; {In case the image does not use alpha information}
+end;
+
+{$IFDEF Store16bits}
+{Returns a png data extra scanline}
+function TPngObject.GetExtraScanline(const LineIndex: Integer): Pointer;
+begin
+ with Header do
+ Longint(Result) := (Longint(ExtraImageData) + ((Longint(Height) - 1) *
+ BytesPerRow)) - (LineIndex * BytesPerRow);
+end;
+{$ENDIF}
+
+{Returns a png data scanline}
+function TPngObject.GetScanline(const LineIndex: Integer): Pointer;
+begin
+ with Header do
+ Longint(Result) := (Longint(ImageData) + ((Longint(Height) - 1) *
+ BytesPerRow)) - (LineIndex * BytesPerRow);
+end;
+
+{Initialize gamma table}
+procedure TPngObject.InitializeGamma;
+var
+ i: Integer;
+begin
+ {Build gamma table as if there was no gamma}
+ FOR i := 0 to 255 do
+ begin
+ GammaTable[i] := i;
+ InverseGamma[i] := i;
+ end {for i}
+end;
+
+{Returns the transparency mode used by this png}
+function TPngObject.GetTransparencyMode: TPNGTransparencyMode;
+var
+ TRNS: TChunkTRNS;
+begin
+ with Header do
+ begin
+ Result := ptmNone; {Default result}
+ {Gets the TRNS chunk pointer}
+ TRNS := Chunks.ItemFromClass(TChunkTRNS) as TChunkTRNS;
+
+ {Test depending on the color type}
+ case ColorType of
+ {This modes are always partial}
+ COLOR_RGBALPHA, COLOR_GRAYSCALEALPHA: Result := ptmPartial;
+ {This modes support bit transparency}
+ COLOR_RGB, COLOR_GRAYSCALE: if TRNS <> nil then Result := ptmBit;
+ {Supports booth translucid and bit}
+ COLOR_PALETTE:
+ {A TRNS chunk must be present, otherwise it won't support transparency}
+ if TRNS <> nil then
+ if TRNS.BitTransparency then
+ Result := ptmBit else Result := ptmPartial
+ end {case}
+
+ end {with Header}
+end;
+
+{Add a text chunk}
+procedure TPngObject.AddtEXt(const Keyword, Text: String);
+var
+ TextChunk: TChunkTEXT;
+begin
+ TextChunk := Chunks.Add(TChunkText) as TChunkTEXT;
+ TextChunk.Keyword := Keyword;
+ TextChunk.Text := Text;
+end;
+
+{Add a text chunk}
+procedure TPngObject.AddzTXt(const Keyword, Text: String);
+var
+ TextChunk: TChunkzTXt;
+begin
+ TextChunk := Chunks.Add(TChunkText) as TChunkzTXt;
+ TextChunk.Keyword := Keyword;
+ TextChunk.Text := Text;
+end;
+
+{Removes the image transparency}
+procedure TPngObject.RemoveTransparency;
+var
+ TRNS: TChunkTRNS;
+begin
+ TRNS := Chunks.ItemFromClass(TChunkTRNS) as TChunkTRNS;
+ if TRNS <> nil then Chunks.RemoveChunk(TRNS)
+end;
+
+{Generates alpha information}
+procedure TPngObject.CreateAlpha;
+var
+ TRNS: TChunkTRNS;
+begin
+ {Generates depending on the color type}
+ with Header do
+ case ColorType of
+ {Png allocates different memory space to hold alpha information}
+ {for these types}
+ COLOR_GRAYSCALE, COLOR_RGB:
+ begin
+ {Transform into the appropriate color type}
+ if ColorType = COLOR_GRAYSCALE then
+ ColorType := COLOR_GRAYSCALEALPHA
+ else ColorType := COLOR_RGBALPHA;
+ {Allocates memory to hold alpha information}
+ GetMem(ImageAlpha, Integer(Width) * Integer(Height));
+ FillChar(ImageAlpha^, Integer(Width) * Integer(Height), #255);
+ end;
+ {Palette uses the TChunktRNS to store alpha}
+ COLOR_PALETTE:
+ begin
+ {Gets/creates TRNS chunk}
+ if Chunks.ItemFromClass(TChunkTRNS) = nil then
+ TRNS := Chunks.Add(TChunkTRNS) as TChunkTRNS
+ else
+ TRNS := Chunks.ItemFromClass(TChunkTRNS) as TChunkTRNS;
+
+ {Prepares the TRNS chunk}
+ with TRNS do
+ begin
+ Fillchar(PaletteValues[0], 256, 255);
+ fDataSize := 1 shl Header.BitDepth;
+ fBitTransparency := False
+ end {with Chunks.Add};
+ end;
+ end {case Header.ColorType}
+
+end;
+
+{Returns transparent color}
+function TPngObject.GetTransparentColor: TColor;
+var
+ TRNS: TChunkTRNS;
+begin
+ TRNS := Chunks.ItemFromClass(TChunkTRNS) as TChunkTRNS;
+ {Reads the transparency chunk to get this info}
+ if Assigned(TRNS) then Result := TRNS.TransparentColor
+ else Result := 0
+end;
+
+{$OPTIMIZATION OFF}
+procedure TPngObject.SetTransparentColor(const Value: TColor);
+var
+ TRNS: TChunkTRNS;
+begin
+ if HeaderPresent then
+ {Tests the ColorType}
+ case Header.ColorType of
+ {Not allowed for this modes}
+ COLOR_RGBALPHA, COLOR_GRAYSCALEALPHA: Self.RaiseError(
+ EPNGCannotChangeTransparent, EPNGCannotChangeTransparentText);
+ {Allowed}
+ COLOR_PALETTE, COLOR_RGB, COLOR_GRAYSCALE:
+ begin
+ TRNS := Chunks.ItemFromClass(TChunkTRNS) as TChunkTRNS;
+ if not Assigned(TRNS) then TRNS := Chunks.Add(TChunkTRNS) as TChunkTRNS;
+
+ {Sets the transparency value from TRNS chunk}
+ TRNS.TransparentColor := {$IFDEF UseDelphi}ColorToRGB({$ENDIF}Value{$IFDEF UseDelphi}){$ENDIF}
+ end {COLOR_PALETTE, COLOR_RGB, COLOR_GRAYSCALE)}
+ end {case}
+end;
+
+{Returns if header is present}
+function TPngObject.HeaderPresent: Boolean;
+begin
+ Result := ((Chunks.Count <> 0) and (Chunks.Item[0] is TChunkIHDR))
+end;
+
+{Returns pixel for png using palette and grayscale}
+{THANY: Added correct support for BitDepth=1 and ColorType=COLOR_GRAYSCALE}
+{THANY: Cast GammaTable index value to Byte to prevent access violation}
+function GetByteArrayPixel(const png: TPngObject; const X, Y: Integer): TColor;
+var
+ ByteData: Byte;
+ DataDepth: Byte;
+begin
+ with png, Header do
+ begin
+ {Make sure the bitdepth is not greater than 8}
+ DataDepth := BitDepth;
+ if DataDepth > 8 then DataDepth := 8;
+ {Obtains the byte containing this pixel}
+ ByteData := pByteArray(png.Scanline[Y])^[X div (8 div DataDepth)];
+ {Moves the bits we need to the right}
+ ByteData := (ByteData shr ((8 - DataDepth) -
+ (X mod (8 div DataDepth)) * DataDepth));
+ {Discard the unwanted pixels}
+ ByteData:= ByteData and ($FF shr (8 - DataDepth));
+
+ {For palette mode map the palette entry and for grayscale convert and
+ returns the intensity}
+ case ColorType of
+ COLOR_PALETTE:
+ with TChunkPLTE(png.Chunks.ItemFromClass(TChunkPLTE)).Item[ByteData] do
+ Result := rgb(GammaTable[rgbRed], GammaTable[rgbGreen],
+ GammaTable[rgbBlue]);
+ COLOR_GRAYSCALE:
+ begin
+ if BitDepth = 1
+ then ByteData := GammaTable[Byte(ByteData * 255)]
+ else ByteData := GammaTable[Byte(ByteData * ((1 shl DataDepth) + 1))];
+ Result := rgb(ByteData, ByteData, ByteData);
+ end;
+ else Result := 0;
+ end {case};
+ end {with}
+end;
+
+{In case vcl units are not being used}
+{$IFNDEF UseDelphi}
+function ColorToRGB(const Color: TColor): COLORREF;
+begin
+ Result := Color
+end;
+{$ENDIF}
+
+{Sets a pixel for grayscale and palette pngs}
+procedure SetByteArrayPixel(const png: TPngObject; const X, Y: Integer;
+ const Value: TColor);
+const
+ ClearFlag: Array[1..8] of Integer = (1, 3, 0, 15, 0, 0, 0, $FF);
+var
+ ByteData: pByte;
+ DataDepth: Byte;
+ ValEntry: Byte;
+begin
+ with png.Header do
+ begin
+ {Map into a palette entry}
+ ValEntry := GetNearestPaletteIndex(Png.Palette, ColorToRGB(Value));
+
+ {16 bits grayscale extra bits are discarted}
+ DataDepth := BitDepth;
+ if DataDepth > 8 then DataDepth := 8;
+ {Gets a pointer to the byte we intend to change}
+ ByteData := @pByteArray(png.Scanline[Y])^[X div (8 div DataDepth)];
+ {Clears the old pixel data}
+ ByteData^ := ByteData^ and not (ClearFlag[DataDepth] shl ((8 - DataDepth) -
+ (X mod (8 div DataDepth)) * DataDepth));
+
+ {Setting the new pixel}
+ ByteData^ := ByteData^ or (ValEntry shl ((8 - DataDepth) -
+ (X mod (8 div DataDepth)) * DataDepth));
+ end {with png.Header}
+end;
+
+{Returns pixel when png uses RGB}
+function GetRGBLinePixel(const png: TPngObject;
+ const X, Y: Integer): TColor;
+begin
+ with pRGBLine(png.Scanline[Y])^[X] do
+ Result := RGB(rgbtRed, rgbtGreen, rgbtBlue)
+end;
+
+{Sets pixel when png uses RGB}
+procedure SetRGBLinePixel(const png: TPngObject;
+ const X, Y: Integer; Value: TColor);
+begin
+ with pRGBLine(png.Scanline[Y])^[X] do
+ begin
+ rgbtRed := GetRValue(Value);
+ rgbtGreen := GetGValue(Value);
+ rgbtBlue := GetBValue(Value)
+ end
+end;
+
+{Returns pixel when png uses grayscale}
+{THANY: added GetGrayLinePixel function}
+function GetGrayLinePixel(const png: TPngObject;
+ const X, Y: Integer): TColor;
+var
+ B: Byte;
+begin
+ B := PByteArray(png.Scanline[Y])^[X];
+ Result := RGB(B, B, B);
+end;
+
+{Sets pixel when png uses grayscale}
+{THANY: added SetGrayLinePixel function}
+procedure SetGrayLinePixel(const png: TPngObject;
+ const X, Y: Integer; Value: TColor);
+begin
+ PByteArray(png.Scanline[Y])^[X] := GetRValue(Value);
+end;
+
+{Sets a pixel}
+{THANY: Added support for COLOR_GRAYSCALEALPHA}
+procedure TPngObject.SetPixels(const X, Y: Integer; const Value: TColor);
+begin
+ if (X in [0..Width - 1]) and (Y in [0..Height - 1]) then
+ with Header do
+ begin
+ case ColorType of
+ COLOR_GRAYSCALE, COLOR_PALETTE:
+ SetByteArrayPixel(Self, X, Y, Value);
+ COLOR_GRAYSCALEALPHA:
+ SetGrayLinePixel(Self, X, Y, Value);
+ else
+ SetRGBLinePixel(Self, X, Y, Value)
+ end; {case}
+ end {with}
+end;
+
+{Returns a pixel}
+{THANY: Added support for COLOR_GRAYSCALEALPHA}
+function TPngObject.GetPixels(const X, Y: Integer): TColor;
+begin
+ if (X in [0..Width - 1]) and (Y in [0..Height - 1]) then
+ with Header do
+ begin
+ case ColorType of
+ COLOR_GRAYSCALE, COLOR_PALETTE:
+ Result := GetByteArrayPixel(Self, X, Y);
+ COLOR_GRAYSCALEALPHA:
+ Result := GetGrayLinePixel(Self, X, Y);
+ else
+ Result := GetRGBLinePixel(Self, X, Y)
+ end; {case}
+ end {with}
+ else Result := 0
+end;
+
+{Returns the image palette}
+function TPngObject.GetPalette: HPALETTE;
+var
+ LogPalette: TMaxLogPalette;
+ i: Integer;
+begin
+ {Palette is avaliable for COLOR_PALETTE and COLOR_GRAYSCALE modes}
+ if (Header.ColorType in [COLOR_PALETTE, COLOR_GRAYSCALE]) then
+ begin
+ {In case the pal}
+ if TempPalette = 0 then
+ with LogPalette do
+ begin
+ {Prepares the new palette}
+ palVersion := $300;
+ palNumEntries := 256;
+ {Copy entries}
+ for i := 0 to LogPalette.palNumEntries - 1 do
+ begin
+ palPalEntry[i].peRed := Header.BitmapInfo.bmiColors[i].rgbRed;
+ palPalEntry[i].peGreen := Header.BitmapInfo.bmiColors[i].rgbGreen;
+ palPalEntry[i].peBlue := Header.BitmapInfo.bmiColors[i].rgbBlue;
+ palPalEntry[i].peFlags := 0;
+ end {for i};
+ {Creates the palette}
+ TempPalette := CreatePalette(pLogPalette(@LogPalette)^);
+ end {with LogPalette, if Temppalette = 0}
+ end {if Header.ColorType in ...};
+ Result := TempPalette;
+end;
+
+{THANY: Added SetPalette to support writeable Palette property}
+procedure TPngObject.SetPalette(Value: HPALETTE);
+var
+ Count, i: Integer;
+ Entries: array[Byte] of TPaletteEntry;
+begin
+ {Palette is avaliable for COLOR_PALETTE and COLOR_GRAYSCALE modes}
+ if (Header.ColorType in [COLOR_PALETTE, COLOR_GRAYSCALE]) then
+ begin
+ Count := GetPaletteEntries(Value, 0, 256, Entries);
+ for i := 0 to Count - 1
+ do begin
+ Header.BitmapInfo.bmiColors[i].rgbBlue := Entries[i].peBlue;
+ Header.BitmapInfo.bmiColors[i].rgbGreen := Entries[i].peGreen;
+ Header.BitmapInfo.bmiColors[i].rgbRed := Entries[i].peRed;
+ end; {for i}
+ DeleteObject(TempPalette);
+ end {if Header.ColorType in ...};
+end;
+
+initialization
+ {Initialize}
+ ChunkClasses := nil;
+ {crc table has not being computed yet}
+ crc_table_computed := FALSE;
+ {Register the necessary chunks for png}
+ RegisterCommonChunks;
+ {Registers TPNGObject to use with TPicture}
+ {$IFDEF UseDelphi}{$IFDEF RegisterGraphic}
+ TPicture.RegisterFileFormat('PNG', 'Portable Network Graphics', TPNGObject);
+ {$ENDIF}{$ENDIF}
+finalization
+ {$IFDEF UseDelphi}{$IFDEF RegisterGraphic}
+ TPicture.UnregisterGraphicClass(TPNGObject);
+ {$ENDIF}{$ENDIF}
+ {Free chunk classes}
+ FreeChunkClassList;
+end.
+
+
diff --git a/internal/1.0 RC3/1/Source/pnglang.dcu b/internal/1.0 RC3/1/Source/pnglang.dcu
new file mode 100644
index 0000000..28815b4
Binary files /dev/null and b/internal/1.0 RC3/1/Source/pnglang.dcu differ
diff --git a/internal/1.0 RC3/1/Source/pnglang.pas b/internal/1.0 RC3/1/Source/pnglang.pas
new file mode 100644
index 0000000..7a9c507
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/pnglang.pas
@@ -0,0 +1,301 @@
+{Portable Network Graphics Delphi Language Info (24 July 2002)}
+
+{Feel free to change the text bellow to adapt to your language}
+{Also if you have a translation to other languages and want to}
+{share it, send me: gubadaud@terra.com.br }
+unit pnglang;
+
+interface
+
+{$DEFINE English}
+{.$DEFINE Portuguese}
+{.$DEFINE German}
+{.$DEFINE French}
+{.$DEFINE Slovenian}
+
+{Language strings for english}
+resourcestring
+ {$IFDEF English}
+ EPngInvalidCRCText = 'This "Portable Network Graphics" image is not valid ' +
+ 'because it contains invalid pieces of data (crc error)';
+ EPNGInvalidIHDRText = 'The "Portable Network Graphics" image could not be ' +
+ 'loaded because one of its main piece of data (ihdr) might be corrupted';
+ EPNGMissingMultipleIDATText = 'This "Portable Network Graphics" image is ' +
+ 'invalid because it has missing image parts.';
+ EPNGZLIBErrorText = 'Could not decompress the image because it contains ' +
+ 'invalid compressed data.'#13#10 + ' Description: ';
+ EPNGInvalidPaletteText = 'The "Portable Network Graphics" image contains ' +
+ 'an invalid palette.';
+ EPNGInvalidFileHeaderText = 'The file being readed is not a valid '+
+ '"Portable Network Graphics" image because it contains an invalid header.' +
+ ' This file may be corruped, try obtaining it again.';
+ EPNGIHDRNotFirstText = 'This "Portable Network Graphics" image is not ' +
+ 'supported or it might be invalid.'#13#10 + '(IHDR chunk is not the first)';
+ EPNGNotExistsText = 'The png file could not be loaded because it does not ' +
+ 'exists.';
+ EPNGSizeExceedsText = 'This "Portable Network Graphics" image is not ' +
+ 'supported because either it''s width or height exceeds the maximum ' +
+ 'size, which is 65535 pixels length.';
+ EPNGUnknownPalEntryText = 'There is no such palette entry.';
+ EPNGMissingPaletteText = 'This "Portable Network Graphics" could not be ' +
+ 'loaded because it uses a color table which is missing.';
+ EPNGUnknownCriticalChunkText = 'This "Portable Network Graphics" image ' +
+ 'contains an unknown critical part which could not be decoded.';
+ EPNGUnknownCompressionText = 'This "Portable Network Graphics" image is ' +
+ 'encoded with an unknown compression scheme which could not be decoded.';
+ EPNGUnknownInterlaceText = 'This "Portable Network Graphics" image uses ' +
+ 'an unknown interlace scheme which could not be decoded.';
+ EPNGCannotAssignChunkText = 'The chunks must be compatible to be assigned.';
+ EPNGUnexpectedEndText = 'This "Portable Network Graphics" image is invalid ' +
+ 'because the decoder found an unexpected end of the file.';
+ EPNGNoImageDataText = 'This "Portable Network Graphics" image contains no ' +
+ 'data.';
+ EPNGCannotChangeSizeText = 'The "Portable Network Graphics" image can not ' +
+ 'be resize by changing width and height properties. Try assigning the ' +
+ 'image from a bitmap.';
+ EPNGCannotAddChunkText = 'The program tried to add a existent critical ' +
+ 'chunk to the current image which is not allowed.';
+ EPNGCannotAddInvalidImageText = 'It''s not allowed to add a new chunk ' +
+ 'because the current image is invalid.';
+ EPNGCouldNotLoadResourceText = 'The png image could not be loaded from the ' +
+ 'resource ID.';
+ EPNGOutMemoryText = 'Some operation could not be performed because the ' +
+ 'system is out of resources. Close some windows and try again.';
+ EPNGCannotChangeTransparentText = 'Setting bit transparency color is not ' +
+ 'allowed for png images containing alpha value for each pixel ' +
+ '(COLOR_RGBALPHA and COLOR_GRAYSCALEALPHA)';
+ EPNGHeaderNotPresentText = 'This operation is not valid because the ' +
+ 'current image contains no valid header.';
+ {$ENDIF}
+ {$IFDEF Portuguese}
+ EPngInvalidCRCText = 'Essa imagem "Portable Network Graphics" não é válida ' +
+ 'porque contém chunks inválidos de dados (erro crc)';
+ EPNGInvalidIHDRText = 'A imagem "Portable Network Graphics" não pode ser ' +
+ 'carregada porque um dos seus chunks importantes (ihdr) pode estar '+
+ 'inválido';
+ EPNGMissingMultipleIDATText = 'Essa imagem "Portable Network Graphics" é ' +
+ 'inválida porque tem chunks de dados faltando.';
+ EPNGZLIBErrorText = 'Não foi possível descomprimir os dados da imagem ' +
+ 'porque ela contém dados inválidos.'#13#10 + ' Descrição: ';
+ EPNGInvalidPaletteText = 'A imagem "Portable Network Graphics" contém ' +
+ 'uma paleta inválida.';
+ EPNGInvalidFileHeaderText = 'O arquivo sendo lido não é uma imagem '+
+ '"Portable Network Graphics" válida porque contém um cabeçalho inválido.' +
+ ' O arquivo pode estar corrompida, tente obter ela novamente.';
+ EPNGIHDRNotFirstText = 'Essa imagem "Portable Network Graphics" não é ' +
+ 'suportada ou pode ser inválida.'#13#10 + '(O chunk IHDR não é o ' +
+ 'primeiro)';
+ EPNGNotExistsText = 'A imagem png não pode ser carregada porque ela não ' +
+ 'existe.';
+ EPNGSizeExceedsText = 'Essa imagem "Portable Network Graphics" não é ' +
+ 'suportada porque a largura ou a altura ultrapassam o tamanho máximo, ' +
+ 'que é de 65535 pixels de diâmetro.';
+ EPNGUnknownPalEntryText = 'Não existe essa entrada de paleta.';
+ EPNGMissingPaletteText = 'Essa imagem "Portable Network Graphics" não pode ' +
+ 'ser carregada porque usa uma paleta que está faltando.';
+ EPNGUnknownCriticalChunkText = 'Essa imagem "Portable Network Graphics" ' +
+ 'contém um chunk crítico desconheçido que não pode ser decodificado.';
+ EPNGUnknownCompressionText = 'Essa imagem "Portable Network Graphics" está ' +
+ 'codificada com um esquema de compressão desconheçido e não pode ser ' +
+ 'decodificada.';
+ EPNGUnknownInterlaceText = 'Essa imagem "Portable Network Graphics" usa um ' +
+ 'um esquema de interlace que não pode ser decodificado.';
+ EPNGCannotAssignChunkText = 'Os chunk devem ser compatíveis para serem ' +
+ 'copiados.';
+ EPNGUnexpectedEndText = 'Essa imagem "Portable Network Graphics" é ' +
+ 'inválida porque o decodificador encontrou um fim inesperado.';
+ EPNGNoImageDataText = 'Essa imagem "Portable Network Graphics" não contém ' +
+ 'dados.';
+ EPNGCannotChangeSizeText = 'A imagem "Portable Network Graphics" não pode ' +
+ 'ser redimensionada mudando as propriedades width e height. Tente ' +
+ 'copiar a imagem de um bitmap usando a função assign.';
+ EPNGCannotAddChunkText = 'O programa tentou adicionar um chunk crítico ' +
+ 'já existente para a imagem atual, oque não é permitido.';
+ EPNGCannotAddInvalidImageText = 'Não é permitido adicionar um chunk novo ' +
+ 'porque a imagem atual é inválida.';
+ EPNGCouldNotLoadResourceText = 'A imagem png não pode ser carregada apartir' +
+ ' do resource.';
+ EPNGOutMemoryText = 'Uma operação não pode ser completada porque o sistema ' +
+ 'está sem recursos. Fecha algumas janelas e tente novamente.';
+ EPNGCannotChangeTransparentText = 'Definir transparência booleana não é ' +
+ 'permitido para imagens png contendo informação alpha para cada pixel ' +
+ '(COLOR_RGBALPHA e COLOR_GRAYSCALEALPHA)';
+ EPNGHeaderNotPresentText = 'Essa operação não é válida porque a ' +
+ 'imagem atual não contém um cabeçalho válido.';
+ {$ENDIF}
+ {Language strings for German}
+ {$IFDEF German}
+ EPngInvalidCRCText = 'Dieses "Portable Network Graphics" Image ist ' +
+ 'ungültig, weil Teile der Daten ungültig sind (CRC-Fehler).';
+ EPNGInvalidIHDRText = 'Dieses "Portable Network Graphics" Image konnte ' +
+ 'nicht geladen werden, weil eine der Hauptdaten (IHDR) beschädigt ' +
+ 'sein könnte.';
+ EPNGMissingMultipleIDATText = 'Dieses "Portable Network Graphics" Image ' +
+ 'ist ungültig, weil Grafikdaten fehlen.';
+ EPNGZLIBErrorText = 'Die Grafik konnte nicht entpackt werden, weil sie ' +
+ 'fehlerhafte komprimierte Daten enthält.'#13#10 + ' Beschreibung: ';
+ EPNGInvalidPaletteText = 'Das "Portable Network Graphics" Image enthält ' +
+ 'eine ungültige Palette.';
+ EPNGInvalidFileHeaderText = 'Die Datei, die gelesen wird, ist kein ' +
+ 'gültiges "Portable Network Graphics" Image, da es keinen gültigen ' +
+ 'Header enthält. Die Datei könnte beschädigt sein, versuchen Sie, ' +
+ 'eine neue Kopie zu bekommen.';
+ EPNGIHDRNotFirstText = 'Dieses "Portable Network Graphics" Image wird ' +
+ 'nicht unterstützt bzw. es könnte ungültig sein.'#13#10 +
+ '(Der IHDR-Chunk ist nicht der erste Chunk in der Datei).';
+ EPNGNotExistsText = 'Die PNG Datei konnte nicht geladen werden, da sie ' +
+ 'nicht existiert.';
+ EPNGSizeExceedsText = 'Dieses "Portable Network Graphics" Image wird nicht ' +
+ 'unterstützt, weil entweder seine Breite oder seine Höhe das Maximum von ' +
+ '65535 Pixeln überschreitet.';
+ EPNGUnknownPalEntryText = 'Es gibt keinen solchen Palettenwert.';
+ EPNGMissingPaletteText = 'Dieses "Portable Network Graphics" Image konnte ' +
+ 'nicht geladen werden, weil die benötigte Farbtabelle fehlt.';
+ EPNGUnknownCriticalChunkText = 'Dieses "Portable Network Graphics" Image ' +
+ 'enhält einen unbekannten kritischen Teil, welcher nicht entschlüsselt ' +
+ 'werden kann.';
+ EPNGUnknownCompressionText = 'Dieses "Portable Network Graphics" Image ' +
+ 'wurde mit einem unbekannten Komprimierungsalgorithmus kodiert, welcher ' +
+ 'nicht entschlüsselt werden kann.';
+ EPNGUnknownInterlaceText = 'Dieses "Portable Network Graphics" Image ' +
+ 'benutzt ein unbekanntes Interlace-Schema, welcher nicht entschlüsselt ' +
+ 'werden kann.';
+ EPNGCannotAssignChunkText = 'Die Chunks müssen kompatibel sein, um ' +
+ 'zugewiesen werden zu können.';
+ EPNGUnexpectedEndText = 'Dieses "Portable Network Graphics" Image ist ' +
+ 'ungültig, der Dekoder stieß unerwarteterweise auf das Ende der Datei.';
+ EPNGNoImageDataText = 'Dieses "Portable Network Graphics" Image enthält ' +
+ 'keine Daten.';
+ EPNGCannotChangeSizeText = 'Das "Portable Network Graphics" Image kann ' +
+ 'nicht durch Ändern der Eigenschaften Width und Height in seinen ' +
+ 'Abmessungen geändert werden. Versuchen Sie das Image von einer Bitmap ' +
+ 'aus zuzuweisen.';
+ EPNGCannotAddChunkText = 'Das Programm versucht einen existierenden ' +
+ 'kritischen Chunk zum aktuellen Image hinzuzufügen. Dies ist nicht ' +
+ 'zulässig.';
+ EPNGCannotAddInvalidImageText = 'Es ist nicht zulässig, dem aktuellen ' +
+ 'Image einen neuen Chunk hinzuzufügen, da es ungültig ist.';
+ EPNGCouldNotLoadResourceText = 'Das PNG Image konnte nicht von den ' +
+ 'Resourcendaten geladen werden.';
+ EPNGOutMemoryText = 'Es stehen nicht genügend Resourcen im System zur ' +
+ 'Verfügung, um die Operation auszuführen. Schließen Sie einige Fenster '+
+ 'und versuchen Sie es erneut.';
+ EPNGCannotChangeTransparentText = 'Das Setzen der Bit-' +
+ 'Transparent-Farbe ist fuer PNG-Images die Alpha-Werte fuer jedes ' +
+ 'Pixel enthalten (COLOR_RGBALPHA und COLOR_GRAYSCALEALPHA) nicht ' +
+ 'zulaessig';
+ EPNGHeaderNotPresentText = 'Die Datei, die gelesen wird, ist kein ' +
+ 'gültiges "Portable Network Graphics" Image, da es keinen gültigen ' +
+ 'Header enthält.';
+ {$ENDIF}
+ {Language strings for French}
+ {$IFDEF French}
+ EPngInvalidCRCText = 'Cette image "Portable Network Graphics" n''est pas valide ' +
+ 'car elle contient des données invalides (erreur crc)';
+ EPNGInvalidIHDRText = 'Cette image "Portable Network Graphics" n''a pu être ' +
+ 'chargée car l''une de ses principale donnée (ihdr) doit être corrompue';
+ EPNGMissingMultipleIDATText = 'Cette image "Portable Network Graphics" est ' +
+ 'invalide car elle contient des parties d''image manquantes.';
+ EPNGZLIBErrorText = 'Impossible de décompresser l''image car elle contient ' +
+ 'des données compressées invalides.'#13#10 + ' Description: ';
+ EPNGInvalidPaletteText = 'L''image "Portable Network Graphics" contient ' +
+ 'une palette invalide.';
+ EPNGInvalidFileHeaderText = 'Le fichier actuellement lu est une image '+
+ '"Portable Network Graphics" invalide car elle contient un en-tête invalide.' +
+ ' Ce fichier doit être corrompu, essayer de l''obtenir à nouveau.';
+ EPNGIHDRNotFirstText = 'Cette image "Portable Network Graphics" n''est pas ' +
+ 'supportée ou doit être invalide.'#13#10 + '(la partie IHDR n''est pas la première)';
+ EPNGNotExistsText = 'Le fichier png n''a pu être chargé car il n''éxiste pas.';
+ EPNGSizeExceedsText = 'Cette image "Portable Network Graphics" n''est pas supportée ' +
+ 'car sa longueur ou sa largeur excède la taille maximale, qui est de 65535 pixels.';
+ EPNGUnknownPalEntryText = 'Il n''y a aucune entrée pour cette palette.';
+ EPNGMissingPaletteText = 'Cette image "Portable Network Graphics" n''a pu être ' +
+ 'chargée car elle utilise une table de couleur manquante.';
+ EPNGUnknownCriticalChunkText = 'Cette image "Portable Network Graphics" ' +
+ 'contient une partie critique inconnue qui n'' pu être décodée.';
+ EPNGUnknownCompressionText = 'Cette image "Portable Network Graphics" est ' +
+ 'encodée à l''aide d''un schémas de compression inconnu qui ne peut être décodé.';
+ EPNGUnknownInterlaceText = 'Cette image "Portable Network Graphics" utilise ' +
+ 'un schémas d''entrelacement inconnu qui ne peut être décodé.';
+ EPNGCannotAssignChunkText = 'Ce morceau doit être compatible pour être assigné.';
+ EPNGUnexpectedEndText = 'Cette image "Portable Network Graphics" est invalide ' +
+ 'car le decodeur est arrivé à une fin de fichier non attendue.';
+ EPNGNoImageDataText = 'Cette image "Portable Network Graphics" ne contient pas de ' +
+ 'données.';
+ EPNGCannotChangeSizeText = 'Cette image "Portable Network Graphics" ne peut pas ' +
+ 'être retaillée en changeant ses propriétés width et height. Essayer d''assigner l''image depuis ' +
+ 'un bitmap.';
+ EPNGCannotAddChunkText = 'Le programme a essayé d''ajouter un morceau critique existant ' +
+ 'à l''image actuelle, ce qui n''est pas autorisé.';
+ EPNGCannotAddInvalidImageText = 'Il n''est pas permis d''ajouter un nouveau morceau ' +
+ 'car l''image actuelle est invalide.';
+ EPNGCouldNotLoadResourceText = 'L''image png n''a pu être chargée depuis ' +
+ 'l''ID ressource.';
+ EPNGOutMemoryText = 'Certaines opérations n''ont pu être effectuée car le ' +
+ 'système n''a plus de ressources. Fermez quelques fenêtres et essayez à nouveau.';
+ EPNGCannotChangeTransparentText = 'Définir le bit de transparence n''est pas ' +
+ 'permis pour des images png qui contiennent une valeur alpha pour chaque pixel ' +
+ '(COLOR_RGBALPHA et COLOR_GRAYSCALEALPHA)';
+ EPNGHeaderNotPresentText = 'Cette opération n''est pas valide car l''image ' +
+ 'actuelle ne contient pas de header valide.';
+ EPNGAlphaNotSupportedText = 'Le type de couleur de l''image "Portable Network Graphics" actuelle ' +
+ 'contient déjà des informations alpha ou il ne peut être converti.';
+ {$ENDIF}
+ {Language strings for slovenian}
+ {$IFDEF Slovenian}
+ EPngInvalidCRCText = 'Ta "Portable Network Graphics" slika je neveljavna, ' +
+ 'ker vsebuje neveljavne dele podatkov (CRC napaka).';
+ EPNGInvalidIHDRText = 'Slike "Portable Network Graphics" ni bilo možno ' +
+ 'naložiti, ker je eden od glavnih delov podatkov (IHDR) verjetno pokvarjen.';
+ EPNGMissingMultipleIDATText = 'Ta "Portable Network Graphics" slika je ' +
+ 'naveljavna, ker manjkajo deli slike.';
+ EPNGZLIBErrorText = 'Ne morem raztegniti slike, ker vsebuje ' +
+ 'neveljavne stisnjene podatke.'#13#10 + ' Opis: ';
+ EPNGInvalidPaletteText = 'Slika "Portable Network Graphics" vsebuje ' +
+ 'neveljavno barvno paleto.';
+ EPNGInvalidFileHeaderText = 'Datoteka za branje ni veljavna '+
+ '"Portable Network Graphics" slika, ker vsebuje neveljavno glavo.' +
+ ' Datoteka je verjetno pokvarjena, poskusite jo ponovno naložiti.';
+ EPNGIHDRNotFirstText = 'Ta "Portable Network Graphics" slika ni ' +
+ 'podprta ali pa je neveljavna.'#13#10 + '(IHDR del datoteke ni prvi).';
+ EPNGNotExistsText = 'Ne morem naložiti png datoteke, ker ta ne ' +
+ 'obstaja.';
+ EPNGSizeExceedsText = 'Ta "Portable Network Graphics" slika ni ' +
+ 'podprta, ker ali njena širina ali višina presega najvecjo možno vrednost ' +
+ '65535 pik.';
+ EPNGUnknownPalEntryText = 'Slika nima vnešene take barvne palete.';
+ EPNGMissingPaletteText = 'Te "Portable Network Graphics" ne morem ' +
+ 'naložiti, ker uporablja manjkajoco barvno paleto.';
+ EPNGUnknownCriticalChunkText = 'Ta "Portable Network Graphics" slika ' +
+ 'vsebuje neznan kriticni del podatkov, ki ga ne morem prebrati.';
+ EPNGUnknownCompressionText = 'Ta "Portable Network Graphics" slika je ' +
+ 'kodirana z neznano kompresijsko shemo, ki je ne morem prebrati.';
+ EPNGUnknownInterlaceText = 'Ta "Portable Network Graphics" slika uporablja ' +
+ 'neznano shemo za preliv, ki je ne morem prebrati.';
+ EPNGCannotAssignChunkText = Košcki morajo biti med seboj kompatibilni za prireditev vrednosti.';
+ EPNGUnexpectedEndText = 'Ta "Portable Network Graphics" slika je neveljavna, ' +
+ 'ker je bralnik prišel do nepricakovanega konca datoteke.';
+ EPNGNoImageDataText = 'Ta "Portable Network Graphics" ne vsebuje nobenih ' +
+ 'podatkov.';
+ EPNGCannotChangeSizeText = 'Te "Portable Network Graphics" sliki ne morem ' +
+ 'spremeniti velikosti s spremembo lastnosti višine in širine. Poskusite ' +
+ 'sliko prirediti v bitno sliko.';
+ EPNGCannotAddChunkText = 'Program je poskusil dodati obstojeci kriticni ' +
+ 'kos podatkov k trenutni sliki, kar ni dovoljeno.';
+ EPNGCannotAddInvalidImageText = 'Ni dovoljeno dodati nov kos podatkov, ' +
+ 'ker trenutna slika ni veljavna.';
+ EPNGCouldNotLoadResourceText = 'Ne morem naložiti png slike iz ' +
+ 'skladišca.';
+ EPNGOutMemoryText = 'Ne morem izvesti operacije, ker je ' +
+ 'sistem ostal brez resorjev. Zaprite nekaj oken in poskusite znova.';
+ EPNGCannotChangeTransparentText = 'Ni dovoljeno nastaviti prosojnosti posamezne barve ' +
+ 'za png slike, ki vsebujejo alfa prosojno vrednost za vsako piko ' +
+ '(COLOR_RGBALPHA and COLOR_GRAYSCALEALPHA)';
+ EPNGHeaderNotPresentText = 'Ta operacija ni veljavna, ker ' +
+ 'izbrana slika ne vsebuje veljavne glave.';
+ {$ENDIF}
+
+
+implementation
+
+end.
diff --git a/internal/1.0 RC3/1/Source/pngzlib.dcu b/internal/1.0 RC3/1/Source/pngzlib.dcu
new file mode 100644
index 0000000..542c7d9
Binary files /dev/null and b/internal/1.0 RC3/1/Source/pngzlib.dcu differ
diff --git a/internal/1.0 RC3/1/Source/pngzlib.pas b/internal/1.0 RC3/1/Source/pngzlib.pas
new file mode 100644
index 0000000..73cb13e
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/pngzlib.pas
@@ -0,0 +1,149 @@
+{Portable Network Graphics Delphi ZLIB linking (16 May 2002) }
+
+{This unit links ZLIB to pngimage unit in order to implement }
+{the library. It's now using the new ZLIB version, 1.1.4 }
+{Note: The .obj files must be located in the subdirectory \obj}
+
+{ Changed 2004.11.25 by Vladimir Bochkarev: }
+{ Upgrade to the new ZLIB version, 1.2.1 }
+
+{ Changed 2004.12.03 by Vladimir Bochkarev: }
+{ Upgrade to the new ZLIB version, 1.2.2 }
+
+unit pngzlib;
+
+interface
+
+type
+
+ TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer;
+ TFree = procedure (AppData, Block: Pointer);
+
+ // Internal structure. Ignore.
+ TZStreamRec = packed record
+ next_in: PChar; // next input byte
+ avail_in: Integer; // number of bytes available at next_in
+ total_in: Integer; // total nb of input bytes read so far
+
+ next_out: PChar; // next output byte should be put here
+ avail_out: Integer; // remaining free space at next_out
+ total_out: Integer; // total nb of bytes output so far
+
+ msg: PChar; // last error message, NULL if no error
+ internal: Pointer; // not visible by applications
+
+ zalloc: TAlloc; // used to allocate the internal state
+ zfree: TFree; // used to free the internal state
+ AppData: Pointer; // private data object passed to zalloc and zfree
+
+ data_type: Integer; // best guess about the data type: ascii or binary
+ adler: Integer; // adler32 value of the uncompressed data
+ reserved: Integer; // reserved for future use
+ end;
+
+function inflateInit_(var strm: TZStreamRec; version: PChar;
+ recsize: Integer): Integer; forward;
+function inflate(var strm: TZStreamRec; flush: Integer): Integer; forward;
+function inflateEnd(var strm: TZStreamRec): Integer; forward;
+function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
+ recsize: Integer): Integer; forward;
+function deflate(var strm: TZStreamRec; flush: Integer): Integer; forward;
+function deflateEnd(var strm: TZStreamRec): Integer; forward;
+
+const
+ zlib_version = '1.2.2';
+
+function adler32(adler: Integer; buf: PChar; len: Integer): Integer;
+
+const
+ Z_NO_FLUSH = 0;
+ Z_PARTIAL_FLUSH = 1;
+ Z_SYNC_FLUSH = 2;
+ Z_FULL_FLUSH = 3;
+ Z_FINISH = 4;
+
+ Z_OK = 0;
+ Z_STREAM_END = 1;
+ Z_NEED_DICT = 2;
+ Z_ERRNO = (-1);
+ Z_STREAM_ERROR = (-2);
+ Z_DATA_ERROR = (-3);
+ Z_MEM_ERROR = (-4);
+ Z_BUF_ERROR = (-5);
+ Z_VERSION_ERROR = (-6);
+
+ Z_NO_COMPRESSION = 0;
+ Z_BEST_SPEED = 1;
+ Z_BEST_COMPRESSION = 9;
+ Z_DEFAULT_COMPRESSION = (-1);
+
+ Z_FILTERED = 1;
+ Z_HUFFMAN_ONLY = 2;
+ Z_DEFAULT_STRATEGY = 0;
+
+ Z_BINARY = 0;
+ Z_ASCII = 1;
+ Z_UNKNOWN = 2;
+
+ Z_DEFLATED = 8;
+
+ _z_errmsg: array[0..9] of PChar = (
+ 'need dictionary', // Z_NEED_DICT (2)
+ 'stream end', // Z_STREAM_END (1)
+ '', // Z_OK (0)
+ 'file error', // Z_ERRNO (-1)
+ 'stream error', // Z_STREAM_ERROR (-2)
+ 'data error', // Z_DATA_ERROR (-3)
+ 'insufficient memory', // Z_MEM_ERROR (-4)
+ 'buffer error', // Z_BUF_ERROR (-5)
+ 'incompatible version', // Z_VERSION_ERROR (-6)
+ ''
+ );
+
+implementation
+
+{$L obj\adler32.obj}
+{$L obj\compress.obj}
+{$L obj\deflate.obj}
+{$L obj\infback.obj}
+{$L obj\inffast.obj}
+{$L obj\inflate.obj}
+{$L obj\inftrees.obj}
+{$L obj\trees.obj}
+
+function adler32; external;
+procedure compressBound; external;
+
+function zcalloc(AppData: Pointer; Items, Size: Integer): Pointer;
+begin
+ GetMem(Result, Items*Size);
+end;
+
+procedure zcfree(AppData, Block: Pointer);
+begin
+ FreeMem(Block);
+end;
+
+procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
+begin
+ FillChar(P^, count, B);
+end;
+
+procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
+begin
+ Move(source^, dest^, count);
+end;
+
+// inflate decompresses data
+function inflateInit_(var strm: TZStreamRec; version: PChar;
+ recsize: Integer): Integer; external;
+function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
+function inflateEnd(var strm: TZStreamRec): Integer; external;
+function inflateReset(var strm: TZStreamRec): Integer; external;
+// deflate compresses data
+function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
+ recsize: Integer): Integer; external;
+function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
+function deflateEnd(var strm: TZStreamRec): Integer; external;
+
+end.
diff --git a/internal/1.0 RC3/1/Source/zlibpas.pas b/internal/1.0 RC3/1/Source/zlibpas.pas
new file mode 100644
index 0000000..64a8526
--- /dev/null
+++ b/internal/1.0 RC3/1/Source/zlibpas.pas
@@ -0,0 +1,156 @@
+{Portable Network Graphics Delphi ZLIB linking (16 May 2002) }
+
+{This unit links ZLIB to pngimage unit in order to implement }
+{the library. It's now using the new ZLIB version, 1.1.4 }
+{Note: The .obj files must be located in the subdirectory \obj}
+
+unit zlibpas;
+
+interface
+
+type
+
+ TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer;
+ TFree = procedure (AppData, Block: Pointer);
+
+ // Internal structure. Ignore.
+ TZStreamRec = packed record
+ next_in: PChar; // next input byte
+ avail_in: Integer; // number of bytes available at next_in
+ total_in: Integer; // total nb of input bytes read so far
+
+ next_out: PChar; // next output byte should be put here
+ avail_out: Integer; // remaining free space at next_out
+ total_out: Integer; // total nb of bytes output so far
+
+ msg: PChar; // last error message, NULL if no error
+ internal: Pointer; // not visible by applications
+
+ zalloc: TAlloc; // used to allocate the internal state
+ zfree: TFree; // used to free the internal state
+ AppData: Pointer; // private data object passed to zalloc and zfree
+
+ data_type: Integer; // best guess about the data type: ascii or binary
+ adler: Integer; // adler32 value of the uncompressed data
+ reserved: Integer; // reserved for future use
+ end;
+
+function inflateInit_(var strm: TZStreamRec; version: PChar;
+ recsize: Integer): Integer; forward;
+function inflate(var strm: TZStreamRec; flush: Integer): Integer; forward;
+function inflateEnd(var strm: TZStreamRec): Integer; forward;
+function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
+ recsize: Integer): Integer; forward;
+function deflate(var strm: TZStreamRec; flush: Integer): Integer; forward;
+function deflateEnd(var strm: TZStreamRec): Integer; forward;
+
+const
+ zlib_version = '1.2.3';
+
+
+const
+ Z_NO_FLUSH = 0;
+ Z_PARTIAL_FLUSH = 1;
+ Z_SYNC_FLUSH = 2;
+ Z_FULL_FLUSH = 3;
+ Z_FINISH = 4;
+
+ Z_OK = 0;
+ Z_STREAM_END = 1;
+ Z_NEED_DICT = 2;
+ Z_ERRNO = (-1);
+ Z_STREAM_ERROR = (-2);
+ Z_DATA_ERROR = (-3);
+ Z_MEM_ERROR = (-4);
+ Z_BUF_ERROR = (-5);
+ Z_VERSION_ERROR = (-6);
+
+ Z_NO_COMPRESSION = 0;
+ Z_BEST_SPEED = 1;
+ Z_BEST_COMPRESSION = 9;
+ Z_DEFAULT_COMPRESSION = (-1);
+
+ Z_FILTERED = 1;
+ Z_HUFFMAN_ONLY = 2;
+ Z_DEFAULT_STRATEGY = 0;
+
+ Z_BINARY = 0;
+ Z_ASCII = 1;
+ Z_UNKNOWN = 2;
+
+ Z_DEFLATED = 8;
+
+ _z_errmsg: array[0..9] of PChar = (
+ 'need dictionary', // Z_NEED_DICT (2)
+ 'stream end', // Z_STREAM_END (1)
+ '', // Z_OK (0)
+ 'file error', // Z_ERRNO (-1)
+ 'stream error', // Z_STREAM_ERROR (-2)
+ 'data error', // Z_DATA_ERROR (-3)
+ 'insufficient memory', // Z_MEM_ERROR (-4)
+ 'buffer error', // Z_BUF_ERROR (-5)
+ 'incompatible version', // Z_VERSION_ERROR (-6)
+ ''
+ );
+
+implementation
+
+{$L obj\adler32.obj}
+{$L obj\deflate.obj}
+{$L obj\infback.obj}
+{$L obj\inffast.obj}
+{$L obj\inflate.obj}
+{$L obj\inftrees.obj}
+{$L obj\trees.obj}
+{$L obj\compress.obj}
+{$L obj\crc32.obj}
+
+
+
+function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; external;
+
+procedure _memset(P: Pointer; B: Byte; count: Integer);cdecl;
+begin
+ FillChar(P^, count, B);
+end;
+
+procedure _memcpy(dest, source: Pointer; count: Integer);cdecl;
+begin
+ Move(source^, dest^, count);
+end;
+
+
+// deflate compresses data
+function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
+ recsize: Integer): Integer; external;
+function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
+function deflateEnd(var strm: TZStreamRec): Integer; external;
+
+// inflate decompresses data
+function inflateInit_(var strm: TZStreamRec; version: PChar;
+ recsize: Integer): Integer; external;
+function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
+function inflateEnd(var strm: TZStreamRec): Integer; external;
+function inflateReset(var strm: TZStreamRec): Integer; external;
+
+
+function zcalloc(AppData: Pointer; Items, Size: Integer): Pointer;
+begin
+ GetMem(Result, Items*Size);
+end;
+
+procedure zcfree(AppData, Block: Pointer);
+begin
+ FreeMem(Block);
+end;
+
+end.
+
+
+
+
+
+
+
+
+
diff --git a/internal/1.0 RC3/1/unins000.dat b/internal/1.0 RC3/1/unins000.dat
new file mode 100644
index 0000000..704a798
Binary files /dev/null and b/internal/1.0 RC3/1/unins000.dat differ
diff --git a/internal/1.0 RC3/1/unins000.exe b/internal/1.0 RC3/1/unins000.exe
new file mode 100644
index 0000000..b55077b
Binary files /dev/null and b/internal/1.0 RC3/1/unins000.exe differ