Package org.apache.tika.parser.enricher
Interface ImageCheck
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BlankImageCheck,ByteSizeCheck,MinImageSizeCheck,RecordedSizeCheck
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 ClassesModifier and TypeInterfaceDescriptionstatic final recordWhether the image goes to the engine; a refusal carries a short, stable reason. -
Method Summary
Modifier and TypeMethodDescriptioncheck(ImageProbe image, Metadata metadata, ParseContext context)
-
Method Details
-
check
ImageCheck.Verdict check(ImageProbe image, Metadata metadata, ParseContext context) throws IOException - Parameters:
image- the image and what earlier checks have already learned about itmetadata- the metadata of the image the engine would be handedcontext- the parse context- Throws:
IOException
-