java.lang.Object
one.jpro.platform.image.manager.ImageResult
Represents the result of an image operation, encapsulating details about
the image file and its dimensions (width and height).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFile()Returns the image file associated with this result.intReturns the height of the image in pixels.intgetWidth()Returns the width of the image in pixels.javafx.scene.image.ImageConverts this image result into anImagesuitable for use within JavaFX applications.
-
Constructor Details
-
ImageResult
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
Returns the image file associated with this result.- Returns:
- The
Fileinstance 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 anImagesuitable 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
Imageinstance representing the image in a format suitable.
-