picslate.make_picture.Piconv
- class picslate.make_picture.Piconv(image: object, paragraphs: list[object], debug: bool = False)[source]
Bases:
objectPiconv.
- __init__(image: object, paragraphs: list[object], debug: bool = False) bool[source]
__init__. convert an image into its translation
- Parameters
image (object) – image to be analyzed
paragraphs (list[object]) – paragraphs to be translated
debug (bool) – display tesseract paragraphs / character bounding box
- Return type
bool
Methods
__init__(image, paragraphs[, debug])__init__.
convert([font, fontsize, background_color, ...])convert.
Attributes
map_font- convert(font: str | None = None, fontsize: int | None = None, background_color: str | None = None, fontcolor: (<class 'int'>, <class 'int'>, <class 'int'>) = None) object[source]
convert. translate the picture
- Parameters
font (str | None) – font to replace the text into
fontsize (int | None) – size font, default calculate an approximate font size
background_color (str | None) – background to replaces, default attempt to find the best background color
fontcolor ((int, int, int) | None) – font color, default, attempt to find the best font color
- Return type
object