[
https://issues.apache.org/jira/browse/PDFBOX-4974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204838#comment-17204838
]
Emmeran Seehuber commented on PDFBOX-4974:
------------------------------------------
Official support for JavaFX on ARM was dropped in a later JDK8 update, see
[https://www.oracle.com/java/technologies/javase/jdk-8u33-arm-relnotes.html].
Also developing with JavaFX at least using maven was a "mess", as you had to
manually add JavaFX to your classpath, using something like
{code:java}
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>2.2</version>
<systemPath>${java.home}/lib/jfxrt.jar</systemPath>
<scope>system</scope>
</dependency>
{code}
The problem here was, that ${java.home}/lib/jfxrt.jar was the path on Windows.
On Linux and MacOS the path was ${java.home}/lib/*ext*/jfxrt.jar. Also only the
OracleJDK included JavaFX, OpenJDK builds usually didn't include it. This was a
rather horrible cross platform development experience.
It got way better with later JavaFX releases. You can now get it using maven,
as it is now deployed on Maven Central. As you can read
[here|https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX] the
source still has ARM support in it, but it is not tested at all for the current
builds. The last official build with ARM support was JavaFX11, see
[here|https://gluonhq.com/products/javafx/].
I think your primary concern about not using SwingFXUtils to convert your
JavaFX image to a BufferedImage is performance. You should be able to
workaround it by directly bridging the JavaFX image to a DataBuffer. As a
sample how this works you can look
[here|https://github.com/haraldk/TwelveMonkeys/tree/master/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/image]
at the classes MappedFileBuffer and MappedImageFactory. You would just change
the implementation of the DataBuffer to not use a memory mapped backed file,
but the image data from JavaFX image instead. No idea if this would be really
faster and if this is worth the effort.
> PDImageXObject creation based on WritableImage
> ----------------------------------------------
>
> Key: PDFBOX-4974
> URL: https://issues.apache.org/jira/browse/PDFBOX-4974
> Project: PDFBox
> Issue Type: New Feature
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Robert Fink
> Priority: Major
> Labels: javafx
>
> The goal is to work with a WritableImage from JavaFX in addition to a
> BufferedImage from Swing.
> My proposal for a new feature is to extend the factory classes.
> - CCITTFactory by the method:
> createFromImage(PDDocument document, WritableImage image)
> - JPEGFactory by the methods:
> createFromImage(PDDocument document, WritableImage image)
> createFromImage(PDDocument document, WritableImage image, float quality)
> createFromImage(PDDocument document, WritableImage image, float quality, int
> dpi)
> - LosslessFactory by methods:
> createFromImage(PDDocument document, WritableImage image)
> Until now there is a need to use the class SwingFXUtils to do the conversion
> from WritableImage to BufferedImage or vice versa.
> This new feature should come in handy for all JavaFX developers.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]