Static Public Member Functions | |
static BufferedImage | createWritableBuffer (int width, int height) |
static long | getTimeFromString (String timestampString) |
Parses strings like 2005:03:30 19:20:23 and returns a java.sql.Timestamp object. | |
static boolean | isJPEGFile (File imageFile) |
static String | readCaptureDateFromEXIF (File photoFile) |
Gets the EXIF timestamp from a photo. | |
static BufferedImage | readImage (File source) |
static Dimension | readSize (File imageFile) |
This works for both JPEG and non JPEG images/photos. | |
static Dimension | readSizeByLoading (File imageFile) |
Load in the image file just to read the photo size. | |
static long | readTimeFrom (File photo) |
If the EXIF field does not exist, it will return a time representing the file last modified date/time. | |
static BufferedImage | scaleImage (BufferedImage src, float sX, float sY) |
Scaled a buffered image by the two scale parameters. | |
static BufferedImage | scaleImageToFit (BufferedImage src, int width, int height) |
static BufferedImage | scaleImageToSize (BufferedImage src, int targetWidth, int targetHeight, boolean maintainAspectRatio) |
static void | writeImageToJPEG (BufferedImage bufferedImage, File file) |
static void | writeImageToJPEG (BufferedImage buffImage, int quality, File outputFile) |
This method is generally BETTER than ImageIO.write(. | |
static void | writeImageToPNG (RenderedImage rImage, File outputFile) |
Definition at line 37 of file ImageUtils.java.
static BufferedImage createWritableBuffer | ( | int | width, | |
int | height | |||
) | [static] |
static long getTimeFromString | ( | String | timestampString | ) | [static] |
Parses strings like 2005:03:30 19:20:23 and returns a java.sql.Timestamp object.
timestampString |
Definition at line 54 of file ImageUtils.java.
Referenced by ImageUtils.readTimeFrom().
static boolean isJPEGFile | ( | File | imageFile | ) | [static] |
Definition at line 81 of file ImageUtils.java.
Referenced by ImageUtils.readSize().
static String readCaptureDateFromEXIF | ( | File | photoFile | ) | [static] |
Gets the EXIF timestamp from a photo.
photoFile |
Definition at line 96 of file ImageUtils.java.
Referenced by ImageUtils.readTimeFrom().
static BufferedImage readImage | ( | File | source | ) | [static] |
static Dimension readSize | ( | File | imageFile | ) | [static] |
This works for both JPEG and non JPEG images/photos.
It defaults to a generic method if it cannot find the jpeg EXIF.
imageFile |
Definition at line 137 of file ImageUtils.java.
References ImageUtils.isJPEGFile(), and ImageUtils.readSizeByLoading().
static Dimension readSizeByLoading | ( | File | imageFile | ) | [static] |
Load in the image file just to read the photo size.
.. This should be slower than readSize(...) if most of your images are JPEG files with EXIF headers... Use it if you are loading non-JPEGS or if your JPEGs do not have EXIFs.
imageFile |
Definition at line 161 of file ImageUtils.java.
Referenced by ImageUtils.readSize().
static long readTimeFrom | ( | File | photo | ) | [static] |
If the EXIF field does not exist, it will return a time representing the file last modified date/time.
TODO Would users rather pick the latest valid time read from the file system (based on an alphabetical sort by name), in the same directory? Maybe it should be a configurable option in whatever software uses this method?
photo |
Definition at line 177 of file ImageUtils.java.
References ImageUtils.getTimeFromString(), and ImageUtils.readCaptureDateFromEXIF().
static BufferedImage scaleImage | ( | BufferedImage | src, | |
float | sX, | |||
float | sY | |||
) | [static] |
Scaled a buffered image by the two scale parameters.
The scale operation is anti-aliased.
src | ||
sX | ||
sY |
Definition at line 196 of file ImageUtils.java.
Referenced by ImageUtils.scaleImageToSize().
static void writeImageToJPEG | ( | BufferedImage | buffImage, | |
int | quality, | |||
File | outputFile | |||
) | [static] |
This method is generally BETTER than ImageIO.write(.
..) as that produces low quality output. This method will not work for a 4-banded image. The colors will look incorrect. Use the PNG version instead.
buffImage | ||
quality | goes from 0 to 100 | |
outputFile | Jun 21, 2006 |
Definition at line 267 of file ImageUtils.java.
static void writeImageToJPEG | ( | BufferedImage | bufferedImage, | |
File | file | |||
) | [static] |
static void writeImageToPNG | ( | RenderedImage | rImage, | |
File | outputFile | |||
) | [static] |