public class ImageHelper extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BACK_AND_WHITE_FILTER |
protected static Logger |
logger
create a static logger.
|
static int |
NO_FILTER |
Constructor and Description |
---|
ImageHelper() |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
createAbsoluteLittleImage(javax.servlet.ServletContext servletContext,
String name,
int width) |
static BufferedImage |
createLittleImage(javax.servlet.ServletContext servletContext,
String name,
int width) |
static String |
createSpecialDirectory(ContentContextBean ctxb,
String context,
String filter,
String area,
String deviceCode,
Template template,
IImageFilter comp,
ImageConfig.ImageParameters param) |
static String |
createSpecialDirectory(int width) |
static String |
createSpecialDirectory(int width,
int filter) |
static BufferedImage |
getBestImageFromVideo(File file)
create a image for display video
|
static int |
getColorCount(BufferedImage image) |
static double |
getContrastRatio(BufferedImage image) |
static Map<String,String> |
getExifData(InputStream in) |
static ImageSize |
getExifSize(InputStream in)
return dimension of picture in exif data, null if not found.
|
static String |
getImageExtensionToManType(String ext) |
static String |
getImageFormat(String fileName) |
static ImageSize |
getImageSize(File file) |
static ImageSize |
getJpegSize(InputStream in) |
static BufferedImage |
loadImage(javax.servlet.ServletContext servletContext,
String name) |
static void |
main(String[] args) |
static String |
pathToKey(String path)
transform a path in a string to a key. this key can be a directory name (
sp. replace / and \ with _ ).
|
static BufferedImage |
resize(BufferedImage aOrgImage,
int width) |
static BufferedImage |
toBufferedImage(org.jcodec.common.model.Picture src) |
static void |
toBufferedImage(org.jcodec.common.model.Picture src,
BufferedImage dst) |
protected static Logger logger
public static final int NO_FILTER
public static final int BACK_AND_WHITE_FILTER
public static String createSpecialDirectory(int width)
public static String createSpecialDirectory(ContentContextBean ctxb, String context, String filter, String area, String deviceCode, Template template, IImageFilter comp, ImageConfig.ImageParameters param)
public static String createSpecialDirectory(int width, int filter)
public static String pathToKey(String path)
path
- a path to a filepublic static BufferedImage createAbsoluteLittleImage(javax.servlet.ServletContext servletContext, String name, int width) throws IOException
IOException
public static BufferedImage loadImage(javax.servlet.ServletContext servletContext, String name) throws IOException
IOException
public static BufferedImage createLittleImage(javax.servlet.ServletContext servletContext, String name, int width) throws IOException
IOException
public static BufferedImage resize(BufferedImage aOrgImage, int width)
public static ImageSize getExifSize(InputStream in) throws IOException
in
- IOException
public static ImageSize getJpegSize(InputStream in)
public static ImageSize getImageSize(File file) throws IOException
IOException
public static Map<String,String> getExifData(InputStream in) throws IOException
IOException
public static BufferedImage toBufferedImage(org.jcodec.common.model.Picture src)
public static void toBufferedImage(org.jcodec.common.model.Picture src, BufferedImage dst)
public static double getContrastRatio(BufferedImage image)
public static int getColorCount(BufferedImage image)
public static BufferedImage getBestImageFromVideo(File file) throws Exception
file
- mp4 fileIOException
org.jcodec.api.JCodecException
Exception
Copyright © 2012-2018. All Rights Reserved.