java.lang.Object
one.jpro.platform.image.manager.ImageResult

public class ImageResult extends Object
Represents the result of an image operation, encapsulating details about the image file and its dimensions (width and height).
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImageResult(File file, int width, int height)
    Constructs a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the image file associated with this result.
    int
    Returns the height of the image in pixels.
    int
    Returns the width of the image in pixels.
    javafx.scene.image.Image
    Converts this image result into an Image suitable for use within JavaFX applications.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImageResult

      public ImageResult(File file, int width, int height)
      Constructs a new instance.
      Parameters:
      file - The image file.
      width - The width of the image in pixels.
      height - The height of the image in pixels.
  • Method Details

    • getFile

      public File getFile()
      Returns the image file associated with this result.
      Returns:
      The File instance representing the image file.
    • getWidth

      public int getWidth()
      Returns the width of the image in pixels.
      Returns:
      The width of the image.
    • getHeight

      public int getHeight()
      Returns the height of the image in pixels.
      Returns:
      The height of the image.
    • toFXImage

      public javafx.scene.image.Image toFXImage()
      Converts this image result into an Image suitable for use within JavaFX applications. If the code is running in a browser context (as determined by the WebAPI), a virtual image is created instead. Otherwise, a standard JavaFX Image object is constructed using the file's URI.
      Returns:
      A Image instance representing the image in a format suitable.