Class ImageUtils

java.lang.Object
net.bluemind.core.utils.ImageUtils

public class ImageUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    checkAndSanitize(byte[] icon)
    Checks the byte array is in a supported image format and returns a PNG version Also rejects the image if the resulting PNG would be bigger than 1MB
    static byte[]
    resize(byte[] image, int width, int height)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • checkAndSanitize

      public static byte[] checkAndSanitize(byte[] icon)
      Checks the byte array is in a supported image format and returns a PNG version Also rejects the image if the resulting PNG would be bigger than 1MB
      Parameters:
      icon -
      Returns:
      Throws:
      ServerFault
    • resize

      public static byte[] resize(byte[] image, int width, int height)