Packages

object ImageParser

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImageParser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bytesToBufferedImage(bytes: Array[Byte]): Option[BufferedImage]

    Decodes raw image bytes into a BufferedImage.

    Decodes raw image bytes into a BufferedImage.

    bytes

    Raw image data (e.g. extracted from Word DOC/DOCX via Apache POI).

    returns

    Option[BufferedImage] if the bytes can be decoded by ImageIO.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def decodeBase64(base64Str: String): Option[BufferedImage]

    Decodes a base64-encoded string into a BufferedImage.

    Decodes a base64-encoded string into a BufferedImage.

    base64Str

    Base64 encoded string (without "data:image/png;base64," prefix).

    returns

    Option[BufferedImage] if the bytes can be decoded by ImageIO.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def fetchFromUrl(urlStr: String, connectTimeoutMs: Int = 1000, readTimeoutMs: Int = 1000, headers: Map[String, String] = Map.empty, maxRedirects: Int = 5): Option[BufferedImage]

    Fetches an image from a remote URL and decodes it into a BufferedImage.

    Fetches an image from a remote URL and decodes it into a BufferedImage.

    Some CDNs (incl. Wikimedia) return 403 to non-browser clients without a descriptive User-Agent. We set one and handle redirects & error bodies.

    urlStr

    Image URL (e.g. https://.../image.png)

    connectTimeoutMs

    Connect timeout in milliseconds

    readTimeoutMs

    Read timeout in milliseconds

    headers

    Additional request headers

    maxRedirects

    Max number of redirects to follow

    returns

    Option[BufferedImage] if the stream can be decoded by ImageIO

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def renderPdfFile(pdfContent: Array[Byte]): Map[Int, Option[BufferedImage]]

    Renders each page of a PDF document into a BufferedImage.

    Renders each page of a PDF document into a BufferedImage.

    pdfContent

    Raw PDF bytes.

    returns

    Map of page index (0-based) to Option[BufferedImage] for each page that could be rendered. If a page cannot be rendered, its value will be None.

  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped