Source: factory.core/ObjImage.py
| Method | Signature | Description |
|---|---|---|
| read | read(image_code: str = '') -> None |
Read an image definition and its |
| pdf_to_image | pdf_to_image(file_path: str) -> None |
Convert a PDF file to a JPEG image using ImageMagick. |
| download | download(url: str, file_: str) -> int |
Download an image from a URL to the |
| find_barcodes | find_barcodes(name: str, img_source) -> list |
Find and decode barcodes in an image. |
| find_face | find_face(name: str, img, orientation: int = 0) |
Detect a face in the image, trying multiple rotations. |
| find_eyes | find_eyes(name: str, img) -> None |
Detect eyes in an image and draw rectangles around them. |
| generate_barcode | generate_barcode(code: str = '', encoding: str = '128', width: int = 500, height: int = 125) |
Generate a barcode image. |
| generate_text | generate_text(code: str = '', font: str = 'arial.ttf', width: int = 500, height: int = 125, color: tuple = (), font_size: int = 0) |
Generate a text overlay image. |
| generate_qr | generate_qr(code: str = '', width: int = 150, height: int = 150) |
Generate a QR code as a PIL Image |
| generate | generate(code: str) -> str |
Generate a composite image from the |
| get_barcode | get_barcode(name: str, ext: str, image_path: str) -> dict |
Read barcodes from an image file. |
| qr_code | qr_code(short_code: str = '', url: str = '', base_dir: str = '') -> str |
Generate a QR code PNG image. |
| qr_decode | qr_decode(file_path: str) -> str |
Decode a QR code from the given image file path. |
| scan | scan(name: str, ext: str, image_path: str) -> int |
Scan an image for faces, rotating if needed. |
| rotate_image | rotate_image(image, angle: float) |
Rotate an image by the given angle around its center. |
| straighten_image | straighten_image(infile: str, outfile: str) -> None |
Deskew an image using Hough line detection. |
| crop_image | crop_image(name: str = '', ext: str = 'jpg') |
Crop an image to its content boundaries. |
| image_to_ascii | image_to_ascii(image_path: str, width: int = 40) -> str |
Convert an image to ASCII art. |
| scan_set | scan_set() -> None |
Scan all images in the BASE_DIR for faces, crops, and barcodes. |
| annotate | annotate(template_ref: str, annotation: str = '') -> None |
Annotate an image with the given template reference. |
| guess_content | guess_content(file_path: str) -> str |
Analyze an image with YOLOv3 and return detected objects. |
| image_detail | image_detail(file_path: str) -> str |
Return image metadata and detected content as JSON. |
Decode a QR code from an image file.
Display the details of an image file.
Guess the content of an image file.