Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.coreutils.ImageUtils Class Reference

Static Public Member Functions

static Image getDefaultIcon ()
 
static boolean thumbnailSupported (Content content)
 
static Image getIcon (Content content, int iconSize)
 
static File getIconFile (Content content, int iconSize)
 
static File getFile (long id)
 
static boolean isJpegFileHeader (AbstractFile file)
 
static boolean isPngFileHeader (AbstractFile file)
 

Static Public Attributes

static final int ICON_SIZE_SMALL = 50
 
static final int ICON_SIZE_MEDIUM = 100
 
static final int ICON_SIZE_LARGE = 200
 

Static Private Member Functions

static Image generateAndSaveIcon (Content content, int iconSize, File saveFile)
 
static BufferedImage generateIcon (Content content, int iconSize)
 

Static Private Attributes

static final Logger logger = Logger.getLogger(ImageUtils.class.getName())
 
static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage()
 
static final List< String > SUPP_EXTENSIONS = Arrays.asList(ImageIO.getReaderFileSuffixes())
 
static final List< String > SUPP_MIME_TYPES = new ArrayList<>(Arrays.asList(ImageIO.getReaderMIMETypes()))
 

Detailed Description

Utilities for creating and manipulating thumbnail and icon images.

Author
jwallace

Definition at line 49 of file ImageUtils.java.

Member Function Documentation

static Image org.sleuthkit.autopsy.coreutils.ImageUtils.generateAndSaveIcon ( Content  content,
int  iconSize,
File  saveFile 
)
staticprivate

Generate an icon and save it to specified location.

Parameters
contentFile to generate icon for
iconSize
saveFileLocation to save thumbnail to
Returns
Generated icon or null on error

Definition at line 238 of file ImageUtils.java.

References org.sleuthkit.autopsy.coreutils.ImageUtils.DEFAULT_ICON, and org.sleuthkit.autopsy.coreutils.ImageUtils.generateIcon().

Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getIcon().

static BufferedImage org.sleuthkit.autopsy.coreutils.ImageUtils.generateIcon ( Content  content,
int  iconSize 
)
staticprivate
static Image org.sleuthkit.autopsy.coreutils.ImageUtils.getDefaultIcon ( )
static

Get the default Icon, which is the icon for a file.

Returns

Definition at line 65 of file ImageUtils.java.

References org.sleuthkit.autopsy.coreutils.ImageUtils.DEFAULT_ICON.

static File org.sleuthkit.autopsy.coreutils.ImageUtils.getFile ( long  id)
static

Get a file object for where the cached icon should exist. The returned file may not exist.

Parameters
id
Returns

Definition at line 170 of file ImageUtils.java.

References org.sleuthkit.autopsy.casemodule.Case.getCacheDirectory(), and org.sleuthkit.autopsy.casemodule.Case.getCurrentCase().

Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getIcon(), and org.sleuthkit.autopsy.coreutils.ImageUtils.getIconFile().

static Image org.sleuthkit.autopsy.coreutils.ImageUtils.getIcon ( Content  content,
int  iconSize 
)
static

Get a thumbnail of a specified size. Generates the image if it is not already cached.

Parameters
content
iconSize
Returns

Definition at line 124 of file ImageUtils.java.

References org.sleuthkit.autopsy.coreutils.ImageUtils.DEFAULT_ICON, org.sleuthkit.autopsy.coreutils.ImageUtils.generateAndSaveIcon(), org.sleuthkit.autopsy.coreutils.ImageUtils.getFile(), and org::sleuthkit::datamodel::Content.getId().

Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getIconFile().

static File org.sleuthkit.autopsy.coreutils.ImageUtils.getIconFile ( Content  content,
int  iconSize 
)
static

Get a thumbnail of a specified size. Generates the image if it is not already cached.

Parameters
content
iconSize
Returns
File object for cached image. Is guaranteed to exist.

Definition at line 156 of file ImageUtils.java.

References org.sleuthkit.autopsy.coreutils.ImageUtils.getFile(), org.sleuthkit.autopsy.coreutils.ImageUtils.getIcon(), and org::sleuthkit::datamodel::Content.getId().

static boolean org.sleuthkit.autopsy.coreutils.ImageUtils.isJpegFileHeader ( AbstractFile  file)
static
static boolean org.sleuthkit.autopsy.coreutils.ImageUtils.isPngFileHeader ( AbstractFile  file)
static
static boolean org.sleuthkit.autopsy.coreutils.ImageUtils.thumbnailSupported ( Content  content)
static

Member Data Documentation

final Image org.sleuthkit.autopsy.coreutils.ImageUtils.DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage()
staticprivate
final int org.sleuthkit.autopsy.coreutils.ImageUtils.ICON_SIZE_LARGE = 200
static

Definition at line 52 of file ImageUtils.java.

final int org.sleuthkit.autopsy.coreutils.ImageUtils.ICON_SIZE_MEDIUM = 100
static

Definition at line 51 of file ImageUtils.java.

final int org.sleuthkit.autopsy.coreutils.ImageUtils.ICON_SIZE_SMALL = 50
static

Definition at line 50 of file ImageUtils.java.

final Logger org.sleuthkit.autopsy.coreutils.ImageUtils.logger = Logger.getLogger(ImageUtils.class.getName())
staticprivate

Definition at line 53 of file ImageUtils.java.

final List<String> org.sleuthkit.autopsy.coreutils.ImageUtils.SUPP_EXTENSIONS = Arrays.asList(ImageIO.getReaderFileSuffixes())
staticprivate

Definition at line 55 of file ImageUtils.java.

final List<String> org.sleuthkit.autopsy.coreutils.ImageUtils.SUPP_MIME_TYPES = new ArrayList<>(Arrays.asList(ImageIO.getReaderMIMETypes()))
staticprivate

Definition at line 56 of file ImageUtils.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.