ocrd_modelfactory package

Factory methods to create models for data, files, URLs.

ocrd_modelfactory.exif_from_filename(image_filename)[source]

Create OcrdExif by opening an image file with PIL and reading its metadata.

Parameters:image_filename (*) –
ocrd_modelfactory.page_from_file(input_file)[source]

Create a new PAGE-XML from a METS file representing a PAGE-XML or an image.

Parameters:input_file (*) –
ocrd_modelfactory.page_from_image(input_file)[source]

Create OcrdPage from an OcrdFile representing an image (i.e. should have mimetype starting with image/).

Parameters:input_file (*) –