Skip to content

Commit

Permalink
Fixed asp.net loading (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesw committed Jun 22, 2014
1 parent 1b92e22 commit 999b2cd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,4 @@ pip-log.txt
/src/AssemblyVersionInfo.cs

/*.Log
*.sdsettings
2 changes: 1 addition & 1 deletion Samples/Tesseract.ConsoleDemo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static void Main(string[] args)

private class ResultPrinter
{
private FormattedConsoleLogger logger;
readonly FormattedConsoleLogger logger;

public ResultPrinter(FormattedConsoleLogger logger)
{
Expand Down
2 changes: 1 addition & 1 deletion Samples/Tesseract.WebDemo/Default.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void OnSubmitFileClicked(object sender, EventArgs args)
{
// for now just fail hard if there's any error however in a propper app I would expect a full demo.

using (var engine = new TesseractEngine(Server.MapPath(@"./tessdata"), "eng", EngineMode.Default))
using (var engine = new TesseractEngine(Server.MapPath(@"~/tessdata"), "eng", EngineMode.Default))
{
// have to load Pix via a bitmap since Pix doesn't support loading a stream.
using (var image = new System.Drawing.Bitmap(imageFile.PostedFile.InputStream))
Expand Down
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>1.0.10</Version>
<Version>1.0.11</Version>
<SourceDir>$(MSBuildProjectDirectory)\src</SourceDir>
<BuildDir>$(MSBuildProjectDirectory)\bin</BuildDir>
<ReleaseDir>$(MSBuildProjectDirectory)\release</ReleaseDir>
Expand Down
7 changes: 6 additions & 1 deletion src/Tesseract/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### Version 1.10

* Added support for uzn files - [Issue 66](https://github.com/charlesw/tesseract/issues/66)
* Added support for uzn files - [Issue 66](https://github.com/charlesw/tesseract/issues/66)

### Version 1.11

* Allow changing the current region of interest without having to reload the entire image (Page.RegionOfInterest)
* Fixed loader for ASP.NET [Issue 97](https://github.com/charlesw/tesseract/issues/97)
2 changes: 1 addition & 1 deletion src/Tesseract/Interop/WindowsLibraryLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void LoadLibrary(string dllName)
#if !ClientProfile
if(HttpContext.Current != null) {
var server = HttpContext.Current.Server;
baseDirectory = Path.GetFullPath(server.MapPath("bin"));
baseDirectory = Path.GetFullPath(server.MapPath("~/bin"));
dllHandle = LoadLibraryInternal(dllName, baseDirectory, processArch);
if (dllHandle != IntPtr.Zero) return;
}
Expand Down

0 comments on commit 999b2cd

Please sign in to comment.