Package gaiasky.util

Class ImageUtils

java.lang.Object
gaiasky.util.ImageUtils

public class ImageUtils
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    ImageUtils()  
  • Method Summary

    Modifier and Type Method Description
    static boolean isMonochrome​(java.io.File file)  
    static boolean monochromeToRGB​(java.io.File file)
    Converts the image in the incoming file to RGB if it is a monochrome image.

    Methods inherited from class java.lang.Object

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

    • ImageUtils

      public ImageUtils()
  • Method Details

    • isMonochrome

      public static boolean isMonochrome​(java.io.File file) throws java.io.IOException, org.apache.commons.imaging.ImageReadException
      Throws:
      java.io.IOException
      org.apache.commons.imaging.ImageReadException
    • monochromeToRGB

      public static boolean monochromeToRGB​(java.io.File file) throws java.io.IOException, org.apache.commons.imaging.ImageReadException, org.apache.commons.imaging.ImageWriteException
      Converts the image in the incoming file to RGB if it is a monochrome image.
      Parameters:
      file - The image to convert
      Returns:
      A boolean indicating whether the conversion was carried out (i.e. the image was actually monochrome).
      Throws:
      java.io.IOException
      org.apache.commons.imaging.ImageReadException
      org.apache.commons.imaging.ImageWriteException