Class ThermalImageFile

All Implemented Interfaces:
Closeable, AutoCloseable

public class ThermalImageFile extends ThermalImage
Describes a file on the physical file system, which contains a ThermalImage. Moreover it contains additional data, which helps to analyze and interpret the image.
  • Method Details

    • isThermalImage

      public static boolean isThermalImage(String file)
      Check if the file contains thermal data. This method will only check the file header, use open(String) to verify that the specified file is not corrupt
      Parameters:
      file - Path to file.
      Throws:
      RuntimeException - when failed to open image file
      IllegalArgumentException - when file is null or empty
    • isThermalImage

      public static boolean isThermalImage(byte[] data)
      Check if the given byte array contains thermal data. This method will only check the file header, use open(byte[]) to verify that the specified file is not corrupt
      Parameters:
      data - Data buffer containing an image.
      Throws:
      IllegalArgumentException - when data is null
    • save

      public void save() throws IOException
      Saves current object to file.

      Note: a default overlay is added to the picture. See save(JavaImageBuffer) for details about the overlay.
      Note: After calling save() the rotation of the image is set to 0

      Throws:
      IOException - when file cannot be stored.
    • save

      public void save(@Nullable @Nullable JavaImageBuffer overlay) throws IOException
      Save this object to a file with provided image as an overlay.

      Note: After calling save(JavaImageBuffer) the rotation of the image is set to 0

      Parameters:
      overlay - an overlay to be added to the stored image. The overlay pixels, are used as plain JPEG part when storing the image. This overlay is what a "casual" image viewer application can "see" and also is usually used to show JPEG thumbnail.
      Throws:
      IOException - when file cannot be stored.
    • getFileName

      public String getFileName()
      Gets an opened file's name, i.e. "FLIR1234.jpg".
      Returns:
      Returns a file name, i.e. "FLIR1234.jpg".
    • getAbsolutePath

      public String getAbsolutePath()
      Gets an absolute path to the file this image was loaded from, i.e. "C:\FLIR\images\FLIR1234.jpg" (Java desktop), "<sd-card>/FLIR/images/FLIR1234.jpg" (Android).
      Returns:
      Returns the loaded file absolute path.