Commit Graph

4496 Commits

Author SHA1 Message Date
Robin Watts
6bcb941bcf Avoid tesseract writing Pix out/reading them back.
By default, when we ImageData::SetPix, we write the data out as a
PNG, just to read it back in to get a compressed buffer of data.
We then use this to generate a new Pix.

In builds of Tesseract on systems where we don't have temp files,
writing files out is problematic.

Not only that, but compressing/uncompressing is slow, and on minimal
builds of leptonica, where we've disabled the format writers to reduce
memory footprint, we get no compression anyway.

In such cases, it'd be far nicer just to keep the original Pix as
the internal data.

Also, when recovering the pixmap from the ImageData, if we know we're
only going to read from the data, we can avoid duplicating it and
just use the original. This is exactly the case when GRAPHICS_DISABLED
is set.

So, introduce a TESSERACT_IMAGEDATA_AS_PIX predefine that we can use
to cause the internal data to be a Pix rather than a compressed
buffer.



Given we don't do compression, and they were writing to memory,
this was all just more effort than we needed.

Also, if we're using GRAPHICS_DISABLED, we might as well just
pixCopy rather than pixClone as only the scaler uses this.
2020-05-04 21:01:22 +01:00
Egor Pugin
cdebe13d81 [ci] Add fail-fast: false strategy. 2020-03-30 01:53:41 +03:00
Stefan Weil
4a00b68c63 Fix lambda function for curl code errors
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-03-18 20:46:52 +01:00
Stefan Weil
9f5a3f6ac7 Fix uninitialized local variable in curl code
Compiler warning:

    src/api/baseapi.cpp:1151:27: warning:
      variable 'curlcode' is uninitialized when used here [-Wuninitialized]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-03-18 19:25:33 +01:00
zdenop
6e307074d8
Merge pull request #2894 from stweil/curl
Report errors from curl_easy functions
2020-03-18 14:14:07 +01:00
Egor Pugin
916875d74a [sw] Fix mingw build. 2020-03-17 17:57:10 +03:00
Egor Pugin
04a7650b51
Update README.md 2020-03-14 03:23:14 +03:00
Egor Pugin
e1cf69fd9e [ci] Update. 2020-03-13 23:45:38 +03:00
Egor Pugin
a6c8d4c692 [ci] Merge three configs into one. 2020-03-13 19:37:22 +03:00
Stefan Weil
ef4f99a994 Run xgetbv instruction only on machines which support it
This fixes a regression for older Intel processors.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-03-08 17:32:10 +01:00
Stefan Weil
a7c9c566ee Update submodule googletest to tagged release release-1.10.0
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-03-08 17:29:46 +01:00
Stefan Weil
a350108592 Update submodule abseil to tagged release 20200225
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-03-08 17:29:09 +01:00
Stefan Weil
eff4dc0603 Use lambda expressions for reporting curl errors
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-02-23 22:44:42 +01:00
Stefan Weil
9972c91127 Report errors from curl_easy functions
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-02-23 22:26:51 +01:00
Egor Pugin
90405ad0e3
Merge pull request #2893 from stweil/piccolo
Update piccolo2d-core and piccolo2d-extras
2020-02-23 19:20:44 +03:00
Egor Pugin
bbd2c31b91
Merge pull request #2895 from stweil/avx
simd: Check whether the OS supports FMA, AVX, ...
2020-02-23 19:20:18 +03:00
Stefan Weil
57ff90687d simd: Check whether the OS supports FMA, AVX, ...
The previous check was only for the MS compiler, but not for gcc and clang.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-02-23 16:34:35 +01:00
Stefan Weil
62010da593 Update piccolo2d-core and piccolo2d-extras
Make also curl less noisy.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-02-23 16:28:08 +01:00
Egor Pugin
695f862bd7
Update linux.yml 2020-02-21 10:37:05 +03:00
Egor Pugin
d6265166c6 Fix sw build after upload. 2020-02-20 13:44:07 +03:00
Egor Pugin
cfb2a2c3a4 Add sw options for openmp. 2020-02-19 16:08:51 +03:00
zdenop
95befed6b1
Merge pull request #2880 from HelgeSverre/patch-1
Update README.md
2020-02-07 10:43:36 +01:00
Helge Sverre
0705abf827
Update README.md
Typo in the work "documentation" in the link to the "Running Tesseract" section
2020-02-07 10:37:10 +01:00
zdenop
ddb663c099
Merge pull request #2878 from zuphilip/patch-1
Update link about pre-build binary packages
2020-02-05 08:07:40 +01:00
Philipp Zumstein
ca2624cdcb
Update link about pre-build binary packages 2020-02-05 07:44:18 +01:00
zdenop
7c3ac569f9
Replace references to the old wiki by new URLs (#2877)
Replace references to the old wiki by new URLs
2020-02-03 14:59:18 +01:00
Stefan Weil
16553014e0 Replace references to the old wiki by new URLs
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-02-03 11:37:41 +01:00
Stefan Weil
20bcbc4058 Catch std::runtime_error exception when setting the locale in debug code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-02-03 07:58:43 +01:00
Stefan Weil
a1a177f582 Doxyfile: Add missing source directories (include, unittest)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-01-30 14:35:24 +01:00
Stefan Weil
cc05d19495 Doxyfile: Update to version 1.8.16
The update was done using `doxygen -u`.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-01-30 14:20:05 +01:00
Egor Pugin
e9db7aae88
Update sw.cpp 2020-01-26 03:48:39 +03:00
Egor Pugin
8c20573ebf [sw] Set cpp standard. 2020-01-26 00:36:50 +03:00
Egor Pugin
946ed4e972 [sw] Fix linux build. 2020-01-25 23:03:16 +03:00
Stefan Weil
78fc00aa17
Merge pull request #2871 from bertsky/fix-choiceiterator
ChoiceIterator: skip symbol without choices
2020-01-24 14:57:45 +01:00
Egor Pugin
b0c275894f [ci] Add linux and macos sw builds to github actions. 2020-01-24 11:45:44 +03:00
Robert Sachunsky
cdc8e44a20 ChoiceIterator: skip symbol without choices 2020-01-24 09:19:14 +01:00
jkang-eng
60248f59d4 Fix "tesseract.exe not flushing stdout/stderr" (Issue #2859) (#2865)
* Issue #2859 - Fix "tesseract.exe not flushing stdout/stderr"
2020-01-21 21:51:08 +01:00
Egor Pugin
912c9978da
Merge pull request #2861 from stweil/master
Remove redundant method from class GenericVector
2020-01-18 17:24:45 +03:00
Stefan Weil
6f2f310fdf Remove redundant method from class GenericVector
length() is not needed: it can be replaced by size().

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-01-18 11:30:14 +01:00
Egor Pugin
f268e6615e
Update sw.yml 2020-01-06 14:08:29 +03:00
Egor Pugin
73744b8caa
Update sw.yml 2020-01-06 03:38:40 +03:00
Egor Pugin
2689f139ec
Update README.md 2020-01-06 03:31:32 +03:00
Egor Pugin
a210605015
Update sw.yml 2020-01-06 03:24:40 +03:00
Egor Pugin
9ffe73cbdc
Update README.md 2020-01-06 03:20:51 +03:00
Egor Pugin
9eff14404d
[ci] Add github actions. 2020-01-06 03:18:47 +03:00
zdenop
9df8710402 Merge branch 'master' of https://github.com/tesseract-ocr/tesseract 2020-01-05 22:33:34 +01:00
zdenop
8ba14a655d fix #2847 cmake with OPENMP_BUILD=ON 2020-01-05 22:33:24 +01:00
Egor Pugin
ca3ce652b1
Update CMakeLists.txt 2020-01-05 23:08:03 +03:00
zdenop
faf54e08f7
Update README.md
Fix typos
2020-01-05 14:07:52 +01:00
zdenop
3aa07371d6
Add badge for Google OSS-Fuzz (#2846)
Add badge for Google OSS-Fuzz
2020-01-05 13:54:04 +01:00