Autopsy
4.4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Classes | |
class | GetThumbnailTask |
interface | PropertyExtractor |
class | ReadImageTask |
class | ReadImageTaskBase |
Static Public Member Functions | |
static File | getCachedThumbnailFile (Content content, int iconSize) |
static Image | getDefaultIcon () |
static Image | getDefaultThumbnail () |
static File | getFile (long id) |
static BufferedImage | getIcon (Content content, int iconSize) |
static File | getIconFile (Content content, int iconSize) |
static int | getImageHeight (AbstractFile file) throws IOException |
static int | getImageWidth (AbstractFile file) throws IOException |
static List< String > | getSupportedImageExtensions () |
static SortedSet< String > | getSupportedImageMimeTypes () |
static BufferedImage | getThumbnail (Content content, int iconSize) |
static boolean | hasImageFileHeader (AbstractFile file) |
static boolean | isGIF (AbstractFile file) |
static boolean | isImageThumbnailSupported (AbstractFile file) |
static boolean | isJpegFileHeader (AbstractFile file) |
static boolean | isPngFileHeader (AbstractFile file) |
static Task< javafx.scene.image.Image > | newGetThumbnailTask (AbstractFile file, int iconSize, boolean defaultOnFailure) |
static Task< javafx.scene.image.Image > | newReadImageTask (AbstractFile file) |
static boolean | thumbnailSupported (Content content) |
Static Public Attributes | |
static final int | ICON_SIZE_LARGE = 200 |
static final int | ICON_SIZE_MEDIUM = 100 |
static final int | ICON_SIZE_SMALL = 50 |
Static Private Member Functions | |
static BufferedInputStream | getBufferedReadContentStream (AbstractFile file) |
static File | getCachedThumbnailLocation (long fileID) |
synchronized static FileTypeDetector | getFileTypeDetector () throws FileTypeDetector.FileTypeDetectorInitException |
static< T > T | getImageProperty (AbstractFile file, final String errorTemplate, PropertyExtractor< T > propertyExtractor) throws IOException |
static long | getJfifStartOfImageOffset (AbstractFile file) |
static byte[] | readHeader (AbstractFile file, int buffLength) throws TskCoreException |
Static Private Attributes | |
static final ConcurrentHashMap< Long, File > | cacheFileMap = new ConcurrentHashMap<>() |
static final BufferedImage | DEFAULT_THUMBNAIL |
static FileTypeDetector | fileTypeDetector |
static final String | FORMAT = "png" |
static final List< String > | GIF_EXTENSION_LIST = Arrays.asList("gif") |
static final SortedSet< String > | GIF_MIME_SET = ImmutableSortedSet.copyOf(new String[]{"image/gif"}) |
static final Executor | imageSaver |
static final Logger | LOGGER = Logger.getLogger(ImageUtils.class.getName()) |
static final boolean | OPEN_CV_LOADED |
static final List< String > | SUPPORTED_IMAGE_EXTENSIONS = new ArrayList<>() |
static final SortedSet< String > | SUPPORTED_IMAGE_MIME_TYPES |
Utilities for working with image files and creating thumbnails. Re-uses thumbnails by storing them in the case's cache directory.
Definition at line 77 of file ImageUtils.java.
|
staticprivate |
Get a BufferedInputStream wrapped around a ReadContentStream for the given AbstractFile.
file | The AbstractFile to get a stream for. |
Definition at line 354 of file ImageUtils.java.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getImageProperty(), org.sleuthkit.autopsy.coreutils.ImageUtils.getThumbnail(), and org.sleuthkit.autopsy.coreutils.ImageUtils.ReadImageTaskBase.readImage().
|
static |
Get a thumbnail of a specified size for the given image. Generates the thumbnail if it is not already cached.
content | the content to generate a thumbnail for |
iconSize | the size (one side of a square) in pixels to generate |
Definition at line 369 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getCachedThumbnailLocation(), and org.sleuthkit.autopsy.coreutils.ImageUtils.getThumbnail().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getIconFile().
|
staticprivate |
Get the location,as a java File, of the cached thumbnail for an file with the given fileID . The returned File may not exist on disk yet.
fileID | the fileID to get the cached thumbnail location for |
Definition at line 384 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.getCachedThumbnailFile(), org.sleuthkit.autopsy.coreutils.ImageUtils.getFile(), and org.sleuthkit.autopsy.coreutils.ImageUtils.GetThumbnailTask.GetThumbnailTask().
|
static |
Get the default thumbnail, which is the icon for a file. Used when we can not generate content based thumbnail.
Definition at line 991 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getDefaultThumbnail().
|
static |
Get the default thumbnail, which is the icon for a file. Used when we can not generate a content based thumbnail.
Definition at line 186 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.DEFAULT_THUMBNAIL.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getDefaultIcon(), and org.sleuthkit.autopsy.corecomponents.ThumbnailViewChildren.ThumbnailViewNode.getIcon().
|
static |
Get a file object for where the cached icon should exist. The returned file may not exist.
id |
Definition at line 1007 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getCachedThumbnailLocation().
|
staticprivate |
//TODO: AUT-2057 this FileTypeDetector needs to be recreated when the user adds new user defined file types.
get a FileTypeDetector
FileTypeDetectorInitException | if initializing the FileTypeDetector failed. |
Definition at line 289 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.fileTypeDetector.
|
static |
Get a thumbnail of a specified size for the given image. Generates the thumbnail if it is not already cached.
content | |
iconSize |
Definition at line 1026 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getThumbnail().
|
static |
Get a thumbnail of a specified size for the given image. Generates the thumbnail if it is not already cached.
content | |
iconSize |
Definition at line 1046 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getCachedThumbnailFile().
|
static |
Get the height of the given image,in pixels.
file |
IOException | If the file is not a supported image or the height could not be determined. |
Definition at line 539 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getImageProperty().
|
staticprivate |
Private template method designed to be used as the implementation of public methods that pull particular (usually meta-)data out of a image file.
file | the file to extract the data from |
errorTemplate | a message template used to log errors. Should take one parameter: the file's unique path or name. |
propertyExtractor | an implementation of PropertyExtractor used to retrieve the specific property. |
IOException | if there was a problem reading the property from the file. |
Definition at line 582 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getBufferedReadContentStream().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getImageHeight(), org.sleuthkit.autopsy.coreutils.ImageUtils.getImageWidth(), and org.sleuthkit.autopsy.coreutils.ImageUtils.ReadImageTaskBase.readImage().
|
static |
Get the width of the given image, in pixels.
file |
IOException | If the file is not a supported image or the width could not be determined. |
Definition at line 522 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.getImageProperty().
|
staticprivate |
Find the offset for the first Start Of Image marker (0xFFD8) in JFIF, allowing for leading End Of Image markers.
file | the AbstractFile to parse |
Definition at line 442 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.readHeader().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.ReadImageTaskBase.readImage().
|
static |
Definition at line 172 of file ImageUtils.java.
|
static |
Definition at line 176 of file ImageUtils.java.
|
static |
Get a thumbnail of a specified size for the given image. Generates the thumbnail if it is not already cached.
content | the content to generate a thumbnail for |
iconSize | the size (one side of a square) in pixels to generate |
Definition at line 306 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.DEFAULT_THUMBNAIL, org.sleuthkit.autopsy.coreutils.ImageUtils.getBufferedReadContentStream(), org.sleuthkit.autopsy.coreutils.ImageUtils.isGIF(), org.sleuthkit.autopsy.coreutils.ImageUtils.newGetThumbnailTask(), and org.sleuthkit.autopsy.corelibs.ScalrWrapper.resizeHighQuality().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getCachedThumbnailFile(), and org.sleuthkit.autopsy.coreutils.ImageUtils.getIcon().
|
static |
Do a direct check to see if the given file has an image file header. NOTE: Currently only jpeg and png are supported.
file | the AbstractFile to check |
Definition at line 404 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.isJpegFileHeader(), and org.sleuthkit.autopsy.coreutils.ImageUtils.isPngFileHeader().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.isImageThumbnailSupported().
|
static |
Checks the MIME type and/or extension of a file to determine whether it is a GIF.
file | the AbstractFile to test |
Definition at line 231 of file ImageUtils.java.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.GetThumbnailTask.call(), org.sleuthkit.autopsy.coreutils.ImageUtils.getThumbnail(), and org.sleuthkit.autopsy.coreutils.ImageUtils.ReadImageTaskBase.readImage().
|
static |
Is the file an image that we can read and generate a thumbnail for?
file | the AbstractFile to test |
Definition at line 219 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.hasImageFileHeader().
Referenced by org.sleuthkit.autopsy.corecomponents.MediaViewImagePanel.isSupported(), and org.sleuthkit.autopsy.coreutils.ImageUtils.thumbnailSupported().
|
static |
Check if the given file is a jpeg based on header.
file | the AbstractFile to check |
Definition at line 415 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.readHeader().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.hasImageFileHeader().
|
static |
Check if the given file is a png based on header.
file | the AbstractFile to check |
Definition at line 479 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.readHeader().
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.hasImageFileHeader().
|
static |
Create a new Task that will get a thumbnail for the given image of the specified size. If a cached thumbnail is available it will be returned as the result of the task, otherwise a new thumbnail will be created and cached.
Note: the returned task is suitable for running in a background thread, but is not started automatically. Clients are responsible for running the task, monitoring its progress, and using its result.
file | The file to create a thumbnail for. |
iconSize | The size of the thumbnail. |
defaultOnFailure | Whether or not to default on failure. |
Definition at line 627 of file ImageUtils.java.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getThumbnail().
|
static |
Create a new Task that will read the file into memory as an javafx.scene.image.Image.
Note: the returned task is suitable for running in a background thread, but is not started automatically. Clients are responsible for running the task, monitoring its progress, and using its result(including testing for null).
file | the file to read as an Image |
Definition at line 801 of file ImageUtils.java.
|
staticprivate |
Definition at line 501 of file ImageUtils.java.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getJfifStartOfImageOffset(), org.sleuthkit.autopsy.coreutils.ImageUtils.isJpegFileHeader(), and org.sleuthkit.autopsy.coreutils.ImageUtils.isPngFileHeader().
|
static |
Can a thumbnail be generated for the content?
Although this method accepts Content, it always returns false for objects that are not instances of AbstractFile.
content | A content object to test for thumbnail support. |
Definition at line 200 of file ImageUtils.java.
References org.sleuthkit.autopsy.coreutils.ImageUtils.isImageThumbnailSupported(), and org.sleuthkit.autopsy.coreutils.VideoUtils.isVideoThumbnailSupported().
|
staticprivate |
Map from tsk object id to Java File object. Used to get the same File for different tasks related to the same object so we can then synchronize on the File.
NOTE: Must be cleared when the case is changed.
Definition at line 107 of file ImageUtils.java.
|
staticprivate |
Definition at line 90 of file ImageUtils.java.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.GetThumbnailTask.call(), org.sleuthkit.autopsy.coreutils.ImageUtils.getDefaultThumbnail(), and org.sleuthkit.autopsy.coreutils.ImageUtils.getThumbnail().
|
staticprivate |
initialized lazily
Definition at line 163 of file ImageUtils.java.
Referenced by org.sleuthkit.autopsy.coreutils.ImageUtils.getFileTypeDetector().
|
staticprivate |
save thumbnails to disk as this format
Definition at line 84 of file ImageUtils.java.
|
staticprivate |
Definition at line 92 of file ImageUtils.java.
|
staticprivate |
Definition at line 93 of file ImageUtils.java.
|
static |
Definition at line 88 of file ImageUtils.java.
|
static |
Definition at line 87 of file ImageUtils.java.
|
static |
Definition at line 86 of file ImageUtils.java.
|
staticprivate |
Thread/Executor that saves generated thumbnails to disk in the background
Definition at line 168 of file ImageUtils.java.
|
staticprivate |
Definition at line 79 of file ImageUtils.java.
|
staticprivate |
Definition at line 98 of file ImageUtils.java.
|
staticprivate |
Definition at line 95 of file ImageUtils.java.
|
staticprivate |
Definition at line 96 of file ImageUtils.java.
Copyright © 2012-2016 Basis Technology. Generated on: Fri Sep 29 2017
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.