Class IconUtils

java.lang.Object
net.thevpc.echo.swing.icons.IconUtils

public class IconUtils extends Object
Author:
thevpc
  • Constructor Details

    • IconUtils

      public IconUtils()
  • Method Details

    • changeColor

      public static void changeColor(BufferedImage imgBuf, int oldRed, int oldGreen, int oldBlue, int newRed, int newGreen, int newBlue)
      Changes all pixels of an old color into a new color, preserving the alpha channel.
    • isSVG

      public static boolean isSVG(URL u)
    • loadFixedScaleImageIconSafe

      public static ImageIcon loadFixedScaleImageIconSafe(URL u, int width, int height)
    • loadFactorScaleImageIconSafe

      public static ImageIcon loadFactorScaleImageIconSafe(URL u, float width, float height)
    • loadFixedScaleImageIcon

      public static ImageIcon loadFixedScaleImageIcon(URL u, int width, int height)
    • loadFactorScaleImageIcon

      public static ImageIcon loadFactorScaleImageIcon(URL u, float width, float height)
    • iconToImage

      public static Image iconToImage(Icon icon)
    • getFactorScaledImage

      public static Image getFactorScaledImage(Image srcImg, float w, float h)
    • getFixedSizeImage

      public static Image getFixedSizeImage(Image srcImg, int w, int h)
    • toBufferedImage

      public static BufferedImage toBufferedImage(Image img)