Free image and project options fixes.

This commit is contained in:
meffi@lab313.ru
2014-04-27 23:45:38 +00:00
parent 911e5cb01a
commit 00585ad31c
4 changed files with 17 additions and 17 deletions

View File

@@ -23,8 +23,7 @@
<UseVersionInfo Value="True"/> <UseVersionInfo Value="True"/>
<AutoIncrementBuild Value="True"/> <AutoIncrementBuild Value="True"/>
<MajorVersionNr Value="1"/> <MajorVersionNr Value="1"/>
<RevisionNr Value="75"/> <RevisionNr Value="78"/>
<BuildNr Value="4"/>
<StringTable CompanyName="Lab 313" FileDescription="The best TIMs tool ever!:)" ProductVersion=""/> <StringTable CompanyName="Lab 313" FileDescription="The best TIMs tool ever!:)" ProductVersion=""/>
</VersionInfo> </VersionInfo>
<BuildModes Count="6"> <BuildModes Count="6">
@@ -38,7 +37,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
<OtherUnitFiles Value="lazpaint\bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
@@ -82,7 +81,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
<OtherUnitFiles Value="lazpaint\bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
@@ -126,7 +125,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
<OtherUnitFiles Value="lazpaint\bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
@@ -170,7 +169,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
<OtherUnitFiles Value="lazpaint\bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
@@ -214,7 +213,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
<OtherUnitFiles Value="lazpaint\bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
@@ -225,7 +224,7 @@
<CodeGeneration> <CodeGeneration>
<SmartLinkUnit Value="True"/> <SmartLinkUnit Value="True"/>
<TargetCPU Value="i386"/> <TargetCPU Value="i386"/>
<TargetOS Value="win32"/> <TargetOS Value="darwin"/>
<Optimizations> <Optimizations>
<OptimizationLevel Value="3"/> <OptimizationLevel Value="3"/>
</Optimizations> </Optimizations>
@@ -351,7 +350,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir);bgrabitmap"/> <IncludeFiles Value="$(ProjOutDir);bgrabitmap"/>
<OtherUnitFiles Value="lazpaint\bgrabitmap"/> <OtherUnitFiles Value="bgrabitmap"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>
@@ -369,7 +368,6 @@
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsDwarf2Set"/> <DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/> <UseExternalDbgSyms Value="True"/>
</Debugging> </Debugging>
<Options> <Options>

View File

@@ -3,7 +3,7 @@
<ProjectSession> <ProjectSession>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="9"/> <Version Value="9"/>
<BuildModes Active="Debug"/> <BuildModes Active="Win Release x86"/>
<Units Count="15"> <Units Count="15">
<Unit0> <Unit0>
<Filename Value="tim2view.lpr"/> <Filename Value="tim2view.lpr"/>
@@ -23,10 +23,11 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="umain"/> <UnitName Value="umain"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="890"/> <TopLine Value="235"/>
<CursorPos X="50" Y="901"/> <CursorPos X="49" Y="244"/>
<UsageCount Value="816"/> <UsageCount Value="816"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
@@ -50,7 +51,6 @@
<Filename Value="ucommon.pas"/> <Filename Value="ucommon.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ucommon"/> <UnitName Value="ucommon"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
@@ -159,8 +159,8 @@
<EditorIndex Value="6"/> <EditorIndex Value="6"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="7"/> <TopLine Value="7"/>
<CursorPos X="69" Y="16"/> <CursorPos X="20" Y="16"/>
<UsageCount Value="56"/> <UsageCount Value="57"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit14> </Unit14>
</Units> </Units>

Binary file not shown.

View File

@@ -246,6 +246,8 @@ begin
dlgSavePNG.FileName := FormatPngName(SelectedScanResult.ScanFile, TIM^.dwTimNumber, SelectedTimInfo.BitMode, cbbCLUT.ItemIndex); dlgSavePNG.FileName := FormatPngName(SelectedScanResult.ScanFile, TIM^.dwTimNumber, SelectedTimInfo.BitMode, cbbCLUT.ItemIndex);
if not dlgSavePNG.Execute then Exit; if not dlgSavePNG.Execute then Exit;
New(Image);
Image := nil;
Tim2Png(TIM, cbbCLUT.ItemIndex, Image, cbbTranspMode.ItemIndex, True); Tim2Png(TIM, cbbCLUT.ItemIndex, Image, cbbTranspMode.ItemIndex, True);
SaveImage(dlgSavePNG.FileName, Image, TIMisIndexed(TIM)); SaveImage(dlgSavePNG.FileName, Image, TIMisIndexed(TIM));
FreeTIM(TIM); FreeTIM(TIM);
@@ -414,7 +416,7 @@ begin
Tim2Png(TIM, cbbCLUT.ItemIndex, Image, cbbTranspMode.ItemIndex, False); Tim2Png(TIM, cbbCLUT.ItemIndex, Image, cbbTranspMode.ItemIndex, False);
Path := Path + FormatPngName(FName, I - 1, BIT_MODE, 0); Path := Path + FormatPngName(FName, I - 1, BIT_MODE, 0);
SaveImage(Path, Image, TIMisIndexed(TIM)); SaveImage(Path, Image, False);
{$IFDEF Linux}FpChmod(Path, &777);{$IFEND} {$IFDEF Linux}FpChmod(Path, &777);{$IFEND}
Image^.Free; Image^.Free;
Image^ := nil; Image^ := nil;