Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fed94bb79 | ||
|
|
8c877482bd | ||
|
|
b17d589e84 |
@@ -6,6 +6,12 @@ Please always read this file before installing the package
|
|||||||
Download software here: https://github.com/jbarlow83/OCRmyPDF/tags
|
Download software here: https://github.com/jbarlow83/OCRmyPDF/tags
|
||||||
|
|
||||||
|
|
||||||
|
v4.0.7:
|
||||||
|
=======
|
||||||
|
|
||||||
|
- Minor correction to Ghostscript output settings
|
||||||
|
|
||||||
|
|
||||||
v4.0.6:
|
v4.0.6:
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ def generate_pdfa(pdf_pages, output_file, threads=1):
|
|||||||
"-dJPEGQ=95",
|
"-dJPEGQ=95",
|
||||||
"-dPDFA=2",
|
"-dPDFA=2",
|
||||||
"-sPDFACompatibilityPolicy=2",
|
"-sPDFACompatibilityPolicy=2",
|
||||||
"-sOutputICCProfile=" + SRGB_ICC_PROFILE,
|
|
||||||
"-sOutputFile=" + gs_pdf.name,
|
"-sOutputFile=" + gs_pdf.name,
|
||||||
]
|
]
|
||||||
args_gs.extend(pdf_pages)
|
args_gs.extend(pdf_pages)
|
||||||
|
|||||||
+11
-6
@@ -110,8 +110,8 @@ class Pix:
|
|||||||
return "<leptonica.Pix image NULL>"
|
return "<leptonica.Pix image NULL>"
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
data = ffi.new('l_uint32 *[]', 1)
|
data = ffi.new('l_uint32 **')
|
||||||
size = ffi.new('size_t *', 0)
|
size = ffi.new('size_t *')
|
||||||
|
|
||||||
err = lept.pixSerializeToMemory(self.cpix, data, size)
|
err = lept.pixSerializeToMemory(self.cpix, data, size)
|
||||||
if err != 0:
|
if err != 0:
|
||||||
@@ -195,16 +195,21 @@ class Pix:
|
|||||||
else:
|
else:
|
||||||
return (None, None)
|
return (None, None)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
@lru_cache(maxsize=1)
|
||||||
|
def make_pixel_sum_tab8():
|
||||||
|
return lept.makePixelSumTab8()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def correlation_binary(pix1, pix2):
|
def correlation_binary(pix1, pix2):
|
||||||
if get_leptonica_version() < 'leptonica-1.72':
|
if get_leptonica_version() < 'leptonica-1.72':
|
||||||
# Older versions of Leptonica (pre-1.72) have a buggy
|
# Older versions of Leptonica (pre-1.72) have a buggy
|
||||||
# implementation of pixCorrelationBinary that overflows on larger
|
# implementation of pixCorrelationBinary that overflows on larger
|
||||||
# images.
|
# images.
|
||||||
pix1_count = ffi.new('l_int32 *', 0)
|
pix1_count = ffi.new('l_int32 *')
|
||||||
pix2_count = ffi.new('l_int32 *', 0)
|
pix2_count = ffi.new('l_int32 *')
|
||||||
pixn_count = ffi.new('l_int32 *', 0)
|
pixn_count = ffi.new('l_int32 *')
|
||||||
tab8 = lept.makePixelSumTab8() # Small memory leak on each call
|
tab8 = Pix.make_pixel_sum_tab8()
|
||||||
|
|
||||||
lept.pixCountPixels(pix1.cpix, pix1_count, tab8)
|
lept.pixCountPixels(pix1.cpix, pix1_count, tab8)
|
||||||
lept.pixCountPixels(pix2.cpix, pix2_count, tab8)
|
lept.pixCountPixels(pix2.cpix, pix2_count, tab8)
|
||||||
|
|||||||
Reference in New Issue
Block a user