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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisMonochrome(java.io.File file)static booleanmonochromeToRGB(java.io.File file)Converts the image in the incoming file to RGB if it is a monochrome image.
-
-
-
Method Detail
-
isMonochrome
public static boolean isMonochrome(java.io.File file) throws java.io.IOException, org.apache.commons.imaging.ImageReadException- Throws:
java.io.IOExceptionorg.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.ImageWriteExceptionConverts 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.IOExceptionorg.apache.commons.imaging.ImageReadExceptionorg.apache.commons.imaging.ImageWriteException
-
-