writeImageWithDPI

fun writeImageWithDPI(image: BufferedImage, outputFile: File, dpi: Int = DEFAULT_DPI, logSignature: String = DEFAULT_LOG_SIGNATURE)

Scrive un BufferedImage in un file PNG con metadati DPI corretti. Ciò garantisce che Tesseract ottenga il file informazioni sulla risoluzione corretta.

Parameters

image

The image to write.

outputFile

The file to write to.

dpi

The DPI (dots per inch) to set in the image metadata.

logSignature

Signature prefix shown in logs to identify the caller context.