Class RecordedSizeCheck

java.lang.Object
org.apache.tika.parser.enricher.RecordedSizeCheck
All Implemented Interfaces:
Serializable, ImageCheck

public class RecordedSizeCheck extends Object implements ImageCheck
The _min-width/_min-height of a "text-recognizers" entry as a check: an image whose recorded dimensions fall short in either is refused; one of unknown size is admitted. Reads metadata only.
Since:
Apache Tika 4.2
See Also:
  • Constructor Details

    • RecordedSizeCheck

      public RecordedSizeCheck(int minWidth, int minHeight)
  • Method Details

    • getMinWidth

      public int getMinWidth()
    • getMinHeight

      public int getMinHeight()
    • tooSmall

      public static boolean tooSmall(Metadata metadata, int minWidth, int minHeight)
      True when the metadata records a width or height below the minimum.
    • check

      public ImageCheck.Verdict check(ImageProbe image, Metadata metadata, ParseContext context)
      Specified by:
      check in interface ImageCheck
      Parameters:
      image - the image and what earlier checks have already learned about it
      metadata - the metadata of the image the engine would be handed
      context - the parse context