Interface ImageCheck

All Superinterfaces:
Serializable
All Known Implementing Classes:
BlankImageCheck, ByteSizeCheck, MinImageSizeCheck, RecordedSizeCheck

public interface ImageCheck extends Serializable
A test an image passes before a text recognizer is asked to read it: big enough, not blank. Checks run in the order a "text-recognizers" entry lists them, cheapest first, and the first to refuse ends the chain; the engine never sees the image and the refusal is recorded as skipped:<reason> in TikaCoreProperties.OCR_WARNINGS. A check that fails, or cannot judge, admits the image: a gate is never a reason to lose text.

Implementations are named @TikaComponents, so a deployment lists them by name; keep pixel work out of tika-core by putting it in the implementing module and sharing what a check decodes through ImageProbe.memo.

Since:
Apache Tika 4.2
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Whether the image goes to the engine; a refusal carries a short, stable reason.
  • Method Summary

    Modifier and Type
    Method
    Description
    check(ImageProbe image, Metadata metadata, ParseContext context)