TransformationResize issue with very "long" image
Hi,
I have an issue with the TransformationResize calculation of the image high. With an image with
w:954, h: 6228 and an setting_display_size of : 3600
It calculates an h: 146
The generated Image by the thumbnail-function is not "nice" and not usable for OCR.
I do not understand the details of the function TransformationResize.execute_on function, but I looks like development is not finished (e.g. fit is always false).
I am happy to support if there is a short "requirements" description for this function, that I am not going into a wrong direction.
For OCR I would prefer to use the original Image-size or make the size configurable.
As an quick workaround I added "size=None" :
class OCRBackendBase(object):
def process_document_page(self, document_page):
logger.info(
'Processing page: %d of document version: %s',
document_page.page_number, document_page.document_version
)
image = document_page.get_image(size=None)
All inputs and suggestions welcome.
thx & br Matthias