Interface ImagePixelConverter


public interface ImagePixelConverter
Renders a remote image as colored text so it can be shown in chat.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull List<String>
    convert(@Nullable String link)
    Downloads and renders the image, bypassing the cache.
    @NonNull List<String>
    convertOrGetCache(@Nullable String link)
    Returns the rendered image, downloading and rendering it only on the first request.
    void
    invalidate(@Nullable String link)
    Drops the cached rendering of an image, or of every image when no link is given.
  • Method Details

    • invalidate

      void invalidate(@Nullable String link)
      Drops the cached rendering of an image, or of every image when no link is given.
      Parameters:
      link - the image url, or null to clear the whole cache
    • convertOrGetCache

      @NonNull List<String> convertOrGetCache(@Nullable String link)
      Returns the rendered image, downloading and rendering it only on the first request.
      Parameters:
      link - the image url, may be null
      Returns:
      one string per row, or an empty list if the image could not be used
    • convert

      @NonNull List<String> convert(@Nullable String link)
      Downloads and renders the image, bypassing the cache.
      Parameters:
      link - the image url, may be null
      Returns:
      one string per row, or an empty list if the image could not be used