Class XbrzImage

java.lang.Object
io.github.stanio.xbrz.awt.XbrzImage

public final class XbrzImage extends Object
xBRZ scaled icons.

new ImageIcon(...)XbrzImage.apply(new ImageIcon(...))

  • Method Details

    • apply

      public static ImageIcon apply(ImageIcon icon)
      Sets up the given icon with a MultiResolutionImage deriving resolution variants by applying xBRZ to the icon's current image. Replaces the given icon's image with a multi-resolution one that uses the current icon's image to produce resolution variants as requested.
      Parameters:
      icon - image icon to set up
      Returns:
      The given ImageIcon with image updated to a MultiResolutionImage deriving resolution variants by applying xBRZ to the icon's current image
    • mrImage

      public static <M extends Image & MultiResolutionImage> M mrImage(Image image)
      Creates a MultiResolutionImage deriving resolution variants by applying xBRZ to the given image.
      Type Parameters:
      M - an Image subclass that implements MultiResolutionImage
      Parameters:
      image - base image to derive resolution variants from
      Returns:
      A MultiResolutionImage dynamically producing xBRZ variants
      See Also: