[
https://issues.apache.org/jira/browse/PDFBOX-4974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204846#comment-17204846
]
Tilman Hausherr commented on PDFBOX-4974:
-----------------------------------------
The trunk is at jdk8. But I don't see a reason to do any work, all you need is
one extra line with SwingFXUtils. And what would be the use case for this?
Usually the images are in files or in streams, these would end as BufferedImage
anyway when ImageIO.read() is called, or the files would be read directly
(which is more efficient). So for the narrow cases left, processing with new
code would be a bit faster.
If you want to write your own as suggested by Emmeran, then I rather suggest
you ask code related questions in the users mailing list and I'll be happy to
answer them. The main thing to do is to put all the image bits / bytes at the
correct places.
> 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]