Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-3096

detect image in any document

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 1.23
    • Fix Version/s: None
    • Component/s: documentation, example, parser
    • Labels:
      None

      Description

      How do I detect whether a document contains an image or not ?

      val parser = new AutoDetectParser()
      val handler = new ToXMLContentHandler()
      parser.parse(tikaIs, handler, new Metadata, new ParseContext)
      println("File Content:" + handler.toString)

       

      I tried using HTMLHandler and based on existence of img tag, considered file contains image. Is there any better way to achieve this? 

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              suchendra suchendra
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: