Fixed OCR usages, now working for Windows 7 by using an additional exe.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2082 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-22 13:58:16 +00:00
commit 9553f840cb
6 changed files with 29 additions and 6 deletions

View file

@ -12,6 +12,7 @@
<AssemblyName>GreenshotOCRCommand</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@ -49,6 +50,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)bin\$(Configuration)\Plugins\Greenshot-OCR-Plugin"
copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)bin\$(Configuration)\Plugins\Greenshot-OCR-Plugin"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View file

@ -38,7 +38,7 @@ namespace GreenshotOCRCommand {
if ("-c".Equals(filename)) {
return 0;
}
modiDocument.Create(args[1]);
modiDocument.Create(filename);
modiDocument.OCR(language, orientimage, straightenImage);
IImage modiImage = modiDocument.Images[0];
ILayout layout = modiImage.Layout;