Package gaiasky.util
Class ImageUtils
java.lang.Object
gaiasky.util.ImageUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isMonochrome(File file)
static boolean
monochromeToRGB(File file)
Converts the image in the incoming file to RGB if it is a monochrome image
-
Constructor Details
-
ImageUtils
public ImageUtils()
-
-
Method Details
-
isMonochrome
public static boolean isMonochrome(File file) throws IOException, org.apache.commons.imaging.ImageReadException- Throws:
IOException
org.apache.commons.imaging.ImageReadException
-
monochromeToRGB
public static boolean monochromeToRGB(File file) throws 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:
IOException
org.apache.commons.imaging.ImageReadException
org.apache.commons.imaging.ImageWriteException
-